Announcement Announcement Module
Collapse
No announcement yet.
Customize the expiry time Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Customize the expiry time

    Hi all,

    is it possible to customize expiry time of the access tokens?


    {

    access_token: "c45e3516-7783-4367-864a-8365e745f6be"
    expires_in: 43199
    refresh_token: "bb92a1ae-5699-4e98-acea-442952271095"

    }


    It's set to ~ 30 days by default. In general that's fine, but for testing I might want to reduce it to a minute for example.

    Is there a special error code returned once an access token has expired, so the consumer has an easy way to find out if it has to issue a refresh token request?

    Thanx
    Sven

  • #2
    The way you do it is by wiring your own instance of org.springframework.security.oauth2.provider.token .InMemoryOAuth2ProviderTokenServices and referencing it with the 'token-services-ref' of the 'provider' element.

    Comment

    Working...
    X