This custom authenticator will add new claims to the authenticated user.
- Stop the server if it is already running
- Build the project using following command
mvn clean install
- Copy the jar file org.wso2.custom.authenticator.local-1.0-SNAPSHOT.jar from the target directory to <IS_HOME>/repository/components/dropins folder
- Start the server
- Create custom local claim called
http://test.wso2.org/claims/customname
and mapped to an attribute which is available in your user store. - Then mapped this claims to an oidc claim.
- Don’t forget to add the oidc claims to the registry.
- Add a service provider by selecting the requested claim as "http://test.wso2.org/claims/customname"
- select Local & Outbound Authentication Configuration and choose
BasicCustom
as the authenticator. - Get an id token for this service provider by authenicating through BasicCustom
- Parse the id token using [1], now you could able to see the claim keplerNumber as a json attribute.
Refer [2] understand the implementations details.
[1] https://jwt.io/