<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">You can set some additional parameters
to Authentication Request (the initial request from your app to
the Keycloak) and every additional parameter will be then saved to
the clientSession note like "client_request_param_foo" in case
that name of your parameter is "foo" . Then you can create
ProtocolMapper implementation, which will read the clientSession
note and put the info as claim to the token. You can take a look
at
<meta http-equiv="content-type" content="text/html;
charset=windows-1252">
<pre style="background-color:#ffffff;color:#000000;font-family:'DejaVu Sans Mono';font-size:9.0pt;">org.keycloak.protocol.oidc.mappers.UserSessionNoteMapper for inspiration - the only difference is, that you will need to call clientSession.getNote instead of userSession.getNote.
Marek
</pre>
<br>
On 11/07/16 18:45, Harry Trinta wrote:<br>
</div>
<blockquote
cite="mid:CA+waeaVs=mcEg2EJG93eZ0mqLX3-0LeScBvDN_2FfapknNF7pA@mail.gmail.com"
type="cite">
<div dir="ltr">I would like to save some notes about the app
and/or the user in the token. For example, if the token is from
a session that is being impersonated.<br>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">2016-07-07 17:27 GMT-03:00 Bruno
Oliveira <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:bruno@abstractj.org" target="_blank">bruno@abstractj.org</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">I don't
think that's possible. What exactly would you like to do?<br>
<div>
<div class="h5"><br>
On 2016-07-07, Harry Trinta wrote:<br>
> Hi,<br>
><br>
> When authenticate through the API token
("*/openid-connect/token"), is<br>
> possible to send a parameter (key/value) and this
parameter be added to<br>
> access_token?<br>
><br>
> Regards,<br>
><br>
> Harry<br>
<br>
</div>
</div>
> _______________________________________________<br>
> keycloak-user mailing list<br>
> <a moz-do-not-send="true"
href="mailto:keycloak-user@lists.jboss.org">keycloak-user@lists.jboss.org</a><br>
> <a moz-do-not-send="true"
href="https://lists.jboss.org/mailman/listinfo/keycloak-user"
rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/keycloak-user</a><br>
<br>
<br>
--<br>
<br>
abstractj<br>
PGP: 0x84DC9914<br>
</blockquote>
</div>
<br>
</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>
</body>
</html>