To enable OAuth support for your client application, you must first register your application by providing an application name. For code and implicit grant types, you have to provide a callback URL. Follow the instructions below to add a new application.
- Expand the OAuth/OpenID Connect Configuration and click Configure.
- Fill in the form that appears. For the Allowed Grant Types you can disable the ones you do not require or wish to block.
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.
identity.xml
file found in the <IS_HOME>/repository/conf/identity
directory and change the <TokenPersistenceProcessor>
property as follows:Code Block | ||
---|---|---|
| ||
<TokenPersistenceProcessor>org.wso2.carbon.identity.oauth.tokenprocessor.EncryptionDecryptionPersistenceProcessor</TokenPersistenceProcessor> |
When filling out the New Application form, the following details should be taken into consideration.
Field | Notes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
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.
| |||||||||||
Allowed Grant Types - The following are the grant types that are used to get the access token: | ||||||||||||
Code | Entering the |
...
username and password required at the service provider will result in a code being generated. This code can be used to obtain the access token.
Implicit This is similar to the code grant type, but instead of generating a code, this directly provides the access token.
Password This authenticates the user using the password provided and the access token is provided.
Client Credential This 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. 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. SAML This uses SAML as the grant type to obtain the access token.
IWA-NTLM This is similar to the password grant type, but it is specific to Microsoft Windows users. PKCE Mandatory Check 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 Check this if you are using PKCE. - 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.
Tip 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 language xml <TokenPersistenceProcessor>org.wso2.carbon.identity.oauth.tokenprocessor.EncryptionDecryptionPersistenceProcessor</TokenPersistenceProcessor>
Panel | ||
---|---|---|
| ||
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: |