admin管理员组

文章数量:1278910

I would like to make sure that all my keycloak clients get "aud" claim with value set to its respective clientId.

For starter, I created a client scope in my realm, called "foobar", which defines mapper "audience-foobar". This mapper hardcodes value of "aud" to value "foobar".

Now that I can assign this to any client, and they will have "aud": "foobar". However, I don't want this value to be hardcoded - is it possible to dynamically resolve value of clientId of client, to whom the client scope has been assigned.

Eg. I imagine I could write something like "${cliendId}" in mapper definition and if I assign this scope to client "bazbar-client", the "aud" would be set to "bazbar-client".

Is it possible? Does it not exists, or did I not search well enough?

Thank you.

本文标签: Dynamically resolve value of clientId in keycloak mapper definitionStack Overflow