Giter Site home page Giter Site logo

Comments (7)

LyricTian avatar LyricTian commented on July 17, 2024

I have added a use example /try in the master branch:cc5f83eabeed9f6bd7a021ee8eb74dd8e0978a9e.

Change the expiration time of the token using the manager.SetAuthorizeCodeTokenCfg function:

manager.SetAuthorizeCodeTokenCfg(manage.DefaultAuthorizeCodeTokenCfg)

from oauth2.

kination avatar kination commented on July 17, 2024

@LyricTian thanks! I'll look on it.

from oauth2.

kination avatar kination commented on July 17, 2024

@LyricTian ok, I could understand more with this example. Thanks.

It could be silly question, but can I ask how client ID/user ID is received from token? It looks like it only sends token, but it seems it reads user/client information from it(looks like ValidationBearerToken does something...). Is there some logic for this?

from oauth2.

LyricTian avatar LyricTian commented on July 17, 2024

In fact, the access token represents the current logged-in user. Each time the server interacts with the server, the server knows which user or client it is. The client does not need to care about its own user ID or client ID.

from oauth2.

kination avatar kination commented on July 17, 2024

@LyricTian oh, sorry to make you complicate. What I mean is, is it possible to get client ID and user ID only with access token data, because localhost:9094/try only sends access token to server. If is not, is client data being stored in somewhere?

Thanks.

from oauth2.

LyricTian avatar LyricTian commented on July 17, 2024

You can use the access token to get the user ID and client ID from the server interface.

from oauth2.

kination avatar kination commented on July 17, 2024

@LyricTian thanks!

from oauth2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.