Results 1 to 2 of 2

Thread: Customize the expiry time

  1. #1

    Default 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. #2
    Join Date
    May 2008
    Location
    Salt Lake City
    Posts
    167

    Default

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •