[keycloak-user] keycloak client protocol mapper (script mapper) to add request header into token
Shane Rowatt
rowatt at optusnet.com.au
Sat Nov 11 19:27:11 EST 2017
When I'm requesting a token from keycloak I want a specific header value (or
extra form data) that was supplied in the request to be put in the JWT
payload of the generated token. I've tried using a Script Mapper to get
access to header values but I can't see how to get access to header values
or data in the form data sent in any of the available script variables:
user, realm, userSession, keyclockSession.
I was hoping I could use a script something like this:
httpRequest.getHeader('X-CID');
More information about the keycloak-user
mailing list