In one of my clients, I want a token mapper which maps a user attribute admin to a token claim is-admin that is boolean.
Well, the problem is, whatever I put in user-attribute and however I configure the mapper, the value for the key token-claim in the token is never correct.
- If in the token mapper I specify the claim JSON type to be “boolean”, then whatever I put in the user attribute
admingets converted to thefalseboolean, probably because the conversion relies on converting a string. I tried putting1andtrueinto the attribute, nothing worked. - If in the token mapper I specifty the claim JSON type to be “JSON”, then it converts
trueinto the integer1, for some reason, which is also not what I want.
How do I solve this?

