<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
See ClientTemplates<br>
<br>
<br>
<div class="moz-cite-prefix">On 2/5/2016 7:59 AM, Thomas Darimont
wrote:<br>
</div>
<blockquote
cite="mid:CAK-7U1hci0xcXQZa9LzWkAFYDa8W0EhmG5pd4V_JYtc3TwSG-w@mail.gmail.com"
type="cite">
<div dir="ltr">
<div>Hello group,</div>
<div><br>
</div>
<div>In my user model I have a custom user attribute that I want
to make available to multiple </div>
<div>clients via the id / access token with just one definition.
Is this already possible somehow?</div>
<div><br>
</div>
<div>Currently one can define custom mappers for a single client
via:</div>
<div>(In Admin Console) Realm -> Clients -> example-client
-> Mappers -> create</div>
<div><br>
</div>
<div>There I can specify a new mapper of type "user attribute"
where I can refer to the actual user attribute, give it a
"token claim name" (e.g. "myattribute") and specify whether
this should be included in the ID and / or access token.</div>
<div><br>
</div>
<div>The user attribute in the token can then be accessed from
within the client via:</div>
<div>KeycloakSecurityContext:getIdToken().getOtherClaims().get("myattribute")</div>
<div><br>
</div>
<div>This apporach however requires that I configure this for
every client - for which I already have 10 (trend: upwards)...</div>
<div>It would make thinks a lot easier if it were possible to
specify those mappers realm wide...</div>
<div><br>
</div>
<div>PS: I'm currently using Keycloak 1.9.0.CR1</div>
<div><br>
</div>
<div>Cheers,</div>
<div>Thomas</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
keycloak-user mailing list
<a class="moz-txt-link-abbreviated" href="mailto:keycloak-user@lists.jboss.org">keycloak-user@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/keycloak-user">https://lists.jboss.org/mailman/listinfo/keycloak-user</a></pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Bill Burke
JBoss, a division of Red Hat
<a class="moz-txt-link-freetext" href="http://bill.burkecentral.com">http://bill.burkecentral.com</a></pre>
</body>
</html>