oauth2
oauth2 copied to clipboard
Create long access_token
How can I create a long access token? what is the configuration I need to do for that?
the current result of token creation
{ "access_token": "SAC112Y-OICIQDCTA7WXPQ", "expires_in": 3600, "scope": "*", "token_type": "Bearer" }
Take a look at manage.MapAccessGenerate and oauth2.AccessGenerate.
You can create long JWTs in your oauth2.AccessGenerate, and map it like this:
manager := manage.NewDefaultManager()
manager.MapAccessGenerate(yourCustomGenerate)