WSO2 Identity Server supports allows you to add a claim dialect via the following procedures:
Using the management console
Follow the instructions below to add a new claim dialect via the management console:
- Enter your username and password to sign in to the Management Console.
- On the Main menu, click Add under Claims.
Click Add Claim Dialect, and enter the Dialect URI.
The Dialect URI is a unique URI identifying the dialect (for example,
http://schema.openid.net/2007/05/claims
).Click Add. The claim dialect you added will appear in the Available Claim Dialects list as follows:
Using the configuration file
Follow the instructions below to add a new claim dialect via a configuration file.
Note
You can add a new claim dialect via a configuration file only before the first start up of the WSO2 Identity Server instance.
- Open the
<IS_HOME>/repository/conf/
file.claim-config.xml
To add a new claim dialect, add the following configuration to the file along with the new claims that you want to add under the dialect. In this example, the new claim dialect is named
SampleAppClaims
.<Dialect dialectURI="http://wso2.org/SampleAppClaims"> <Claim> <ClaimURI>http://wso2.org/SampleAppClaims/givenname</ClaimURI> <DisplayName>First Name</DisplayName> <MappedLocalClaim>http://wso2.org/claims/givenname</MappedLocalClaim> </Claim> <Claim> <ClaimURI>http://wso2.org/SampleAppClaims/nickName</ClaimURI> <DisplayName>Nick Name</DisplayName> <MappedLocalClaim>http://wso2.org/claims/nickname</MappedLocalClaim> </Claim> </Dialect>
Once you edit the
claim-config.
xml file, start WSO2 Identity Server. The configurations will be applied, and you can view the new claim dialect via the management console.The claim dialects configured in
<IS_HOME>/repository/conf/claim-config.xml
file are applied only when you start the product for the first time, or for any newly created tenants.At the first startup, claim dialects and claims are loaded from the file and persisted in the database. Therefore, any consecutive updates to the file are not be picked up because claim dialects and claims are loaded from the database.
For information on how to add an external claim to this claim dialect, or add a local claim to the wso2 local claim dialect, see Adding Claim Mapping.