Token Expiration Policy - OAuth Authentication

The expiration policy for OAuth tokens is controlled by CAS settings and properties. Note that while access and refresh tokens may have their own lifetime and expiration policy, they are typically upper-bound to the length of the CAS single sign-on session.

OAuth Codes

The following settings and properties are available from the CAS configuration catalog:

The configuration settings listed below are tagged as Required in the CAS configuration metadata. This flag indicates that the presence of the setting may be needed to activate or affect the behavior of the CAS feature and generally should be reviewed, possibly owned and adjusted. If the setting is assigned a default value, you do not need to strictly put the setting in your copy of the configuration, but should review it nonetheless to make sure it matches your deployment expectations.

The configuration settings listed below are tagged as Optional in the CAS configuration metadata. This flag indicates that the presence of the setting is not immediately necessary in the end-user CAS configuration, because a default value is assigned or the activation of the feature is not conditionally controlled by the setting value.

  • cas.authn.oauth.code.number-of-uses=1
  • Number of times this code is valid and can be used.

    org.apereo.cas.configuration.model.support.oauth.OAuthCodeProperties.

  • cas.authn.oauth.code.remove-related-access-tokens=false
  • Remove the related access tokens when trying to use a code which is expired or no longer exists.

    org.apereo.cas.configuration.model.support.oauth.OAuthCodeProperties.

  • cas.authn.oauth.code.storage-name=oauthCodesCache
  • The storage object name used and created by CAS to hold OAuth codes in the backing ticket registry implementation.

    org.apereo.cas.configuration.model.support.oauth.OAuthCodeProperties.

  • cas.authn.oauth.code.time-to-kill-in-seconds=30
  • Duration in seconds where the code is valid.

    org.apereo.cas.configuration.model.support.oauth.OAuthCodeProperties.