How can custom claims be added to an ID Token?
GATEWAY 9.x, 10
As of the OAuth Toolkit (OTK) 4.2 we do not currently support the addition of custom claims within an ID token. If needed you can however add additional details to the JSON Web Token (JWT) header.
For example, if you would like to add the below to your ID Token follow these steps:
1. Create a context variable of type string containing the JSON formatted data you wish to add
2. Generate an ID Token using the 'Generate ID Token' assertion
3. Encode the ID Token as a JWT using the 'Encode Json Web Token' assertion. Select the option 'Merge to Generated Header' option and specify the context variable we created above for the value.
The result will now include the custom values in the JWT header: