Comments (7)
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.
@LyricTian thanks! I'll look on it.
from oauth2.
@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.
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.
@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.
You can use the access token to get the user ID and client ID from the server interface.
from oauth2.
@LyricTian thanks!
from oauth2.
Related Issues (20)
- server support for device code auth flow
- [Question] ed25519 sign method support ?
- use base64.RawURLEncoding instead of trimming the padding
- [bug]failed to refresh token
- Does this library support authentication via google and facebook? HOT 3
- When obtaining the token through auth2 concurrently, only the scope value is different, but the returned token is the same HOT 1
- Redirect URI is not compared to configured value HOT 2
- 我在go-zero中集成go-oauth2后,如何跨服务验证token HOT 1
- Is it possible to put the client id and client secret in headers instead of query params?
- how to handle concurrency/unique sessions
- Feature Request: use a local time.Now implementation through module to support testing
- GetRedirectURI return sso code url err HOT 2
- There is no method provided to clean up the specified clientid in the clientstore.
- configuring multiple domains for redirect_uri
- AllowedCodeChallengeMethods is forced to include plain.
- Why must set UserAuthorizationHandler? HOT 1
- Retrieve the clientID using the token?
- Missing refresh_token in response for client_credentials HOT 1
- Example doesn't work - access_denied HOT 2
- Validating redirect_uri via ValidateURIHandler is a bit weird
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from oauth2.