This documentation is for WSO2 Identity Server 5.3.0 . View documentation for the latest release.

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


  1. Expand the Inbound Authentication Configuration section and then expand OAuth/OpenID Connect Configuration. Click Configure.
  2. Fill in the form that appears. For the Allowed Grant Types you can disable the ones you do not require or wish to block.


    Note: The grant type highlighted below is a custom grant type. This will only appear on the UI if you have configured the JWT grant type. The value specified in the <GrantTypeName> property of the identity.xml file when creating the custom grant type is the value that will appear on the UI. For more information on writing a custom grant type, see Writing a Custom OAuth 2.0 Grant Type.

    When filling out the New Application form, the following details should be taken into consideration.

    OAuth Version

    Selecting OAuth Version as 1.0a removes all the configurable Allowed Grant Types. This is because this version of OAuth does not support grant types.

    Callback Url

    This is the exact location in the service provider's application where an access token would be sent. This is a required field (if the grant type is anything other than 'Code' or 'Implicit') and it is important to configure, as it is imperative that the service provider receives the access token. This is necessary for security purposes to ensure that the token is not compromised.

    titleConfigure multiple callback URLs

    From IS 5.2.0 onwards, regex based consumer URLs are supported when defining the callback URL. This enables you to configure multiple callback URLs for one application by entering a regex pattern as the value for the callback URL field.
    For example, if you have two service providers that use the same application, you can now define a regex pattern which will work for both callback URLs instead of having to configure two different applications for the two service providers. Assume the two callback URLs for your two service providers are as follows:

    • https://testapp:8080/callback

    To configure the callback URL to work for both of these URLs, set it using a regex pattern as follows:

    Code Block

    To send a request with multiple callback URLs, click here.


    You must have the prefix 'regexp=' before your regex pattern. To define a normal URL, you can specify the callback URL without this prefix.

    You can also configure a regex pattern that contains dynamic values as seen below

    Code Block
    Allowed Grant Types - The following are the grant types that are used to get the access token:

    Entering the user name and password required at the service provider will result in a code being generated. This code can be used to obtain the access token. For more information on this grant type, see this Authorization Code specification.


    This is similar to the code grant type, but instead of generating a code, this directly provides the access token. For more information on this grant type, see this Implicit Grant specification.


    This authenticates the user using the password provided and the access token is provided. For more information on this grant type, see this Resource Owner Password Credentials Grant specification.

    Client CredentialThis is the grant type for the client key and client secret. If these two items are provided correctly by the service provider, the access token is sent. For more information on this grant type, see this Client Credentials specification.
    Refresh Token This will enable the user to obtain an access token by using the refresh token once the originally provided access token is used up. For more information on this grant type, see this Refresh Token specification.

    This uses SAML assertion to obtain the access token. For more information on this grant type, see this SAML2 Bearer specification.

    IWA-NTLMThis is similar to the password grant type, but it is specific to Microsoft Windows users.
    urn:ietf:params:oauth: grant-type:jwt-bearer This is a custom grant type. It uses a JWT token to obtain the access token. For more information about this grant type, see this JWT specification.
    PKCE Mandatory Select this if you are using the Code grant type. PKCE is a recommended security measure used to mitigate a code interception attack. See Mitigating Authorization Code Interception Attacks for more information.
    Support PKCE 'Plain' Transform Algorithm Select this if you are using PKCE.
    No include

  3. Anchor
    Click Add. The following information is added for your service provider.
    • OAuth Client Key - This is the client key of the service provider, which will be checked for authentication by the Identity Server before providing the access token.
    • OAuth Client Secret - This is the client secret of the service provider, which will be checked for authentication by the Identity Server before providing the access token. Click the Show button to view the exact value of this.
    • Actions - 
      • Edit: Click to edit the OAuth/OpenID Connect Configurations

      • Revoke: Click to revoke (deactivate) the OAuth application. This action revokes all tokens issued for this application. In order to activate the application, you have to regenerate the consumer secret. 

      • Regenerate Secret: Click to regenerate the secret key of the OAuth application. 

      • Delete: Click to delete the OAuth/OpenID Connect Configurations.


    Tip: The OAuth client key and client secret are stored in plain text. To encrypt the client secret, access token and refresh token, do the following:

    Open the identity.xml file found in the <IS_HOME>/repository/conf/identity directory and change the <TokenPersistenceProcessor> property as follows:

    Code Block

    After updating the configuration, make sure to restart the server for the changes to be applied on WSO2 IS.


titleDefining access token validity period
  1. Note

    WSO2 Identity Server enables defining OAuth token validity periods for all OAuth service providers as well as for a particular service provider.


  • By default, the token validity period is set to 3600 seconds, i.e., one hour. If you set a minus value, e.g., -1, the token never expires.
  • The configuration changes mentioned below applies only to the newly created access tokens.


Tabs Page
titleDefining access token validity period globally
  1. Open the identity.xml file in the <IS_HOME>/repository/conf/ identity directory.
  2. To change the application access token expiry time, update the <AccessTokenDefaultValidityPeriod> element value.

    Code Block
  3. To change the user access token expiry time, update the <UserAccessTokenDefaultValidityPeriod> element value.

    Code Block


titleDefining access token validity period per service provider


Apply the WUM update for WSO2 IS 5.3.0 released on 2017-07-11.


If you want to deploy a WUM update into production, you need to have a paid subscription. If you do not have a paid subscription, you can use this feature with the next version of WSO2 Identity Server when it is released. For more information on updating WSO2 Identity Server using WUM, see  Getting Started with WUM  in the WSO2 Administration Guide. 


Sign in to WSO2 IS Management Console.


The access token validity period of the service providers are stored in the registry as a registry resource. To search this registry resource, enter the resource path /_system/config/identity/config/spTokenExpireTime in the Location search box and click Go.


  1. Name: This is the client key of the service provider that was generated in step 3 above.
  2. Value: This captures the access token validity periods in the following format.

    Code Block



No include
titleRelated Topics

See Configuring OpenID Connect Single Logout to configure single logout or session management with OpenID Connect.

See Delegated Access Control for more information on working with OAuth2/OpenIDConnect. See the following topics for samples of configuring delegated access control: