WSO2-IS - Set default value to a Claim

Viewed 28

How can I set a default value to a claim when configuring a Service Provider on WSO2-IS carbon?

Claim Configuration

I'd like to set a default value to userDirectory according to environment that I've created to pass to Service Provider.

WSO2-IS 5.11.0

1 Answers

AFAIK there is not OOTB config you can achieve this. I can suggest two ways for you to try this.

  1. You can do customization and get this capability. You can write a lister and subscribe to PostAddUser event or PostGetUser event. To do so you need to introduce a new claim as well.
  2. IF you want to include this claim in the ID token, then you can implement a custom claim provider. Follow the blog for more details.

Edit:

AFAIU there is a 3rd option you can do that is explained in issue, where you can define a custom claim handler. With this approach, the claims will be added to all the assertions.

Related