oauth2 icon indicating copy to clipboard operation
oauth2 copied to clipboard

Create long access_token

Open mtmibjas opened this issue 3 years ago • 1 comments

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" }

mtmibjas avatar Jun 01 '22 08:06 mtmibjas

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)

realbucksavage avatar Jun 29 '22 05:06 realbucksavage