[keycloak-user] Client Mappers. Can I define mappers programmatically?

Edgar Vonk - Info.nl Edgar at info.nl
Mon Feb 29 10:34:29 EST 2016


Hi Reed,

You also need to expose your mapper in a org.keycloak.protocol.ProtocolMapper file in META-INF/resources. See the one in the services project of the Keycloak Github source code.

cheers

On 26 Feb 2016, at 18:49, Reed Lewis <RLewis at carbonite.com<mailto:RLewis at carbonite.com>> wrote:

Can someone provide (if there is one out there) of an example of adding an additional OIDC mapper to Keycloak?   I have tried to compile and load a module to add an additional mapper, and cannot seem to get it working.   My new mapper does not appear as a choice for modifying the clJWT claim.

Or do I need to add it to the main source tree and recompile the whole Keycloak project?

Thanks,

Reed

From: Thomas Darimont <thomas.darimont at googlemail.com<mailto:thomas.darimont at googlemail.com>>
Date: Wednesday, February 24, 2016 at 4:31 PM
To: Reed Lewis <RLewis at carbonite.com<mailto:RLewis at carbonite.com>>
Cc: "keycloak-user at lists.jboss.org<mailto:keycloak-user at lists.jboss.org>" <keycloak-user at lists.jboss.org<mailto:keycloak-user at lists.jboss.org>>
Subject: Re: [keycloak-user] Client Mappers. Can I define mappers programmatically?

Hello Reed,

yes you should be able to do that via the:
org.keycloak.protocol.ProtocolMapperSpi

You can provide your own org.keycloak.protocol.ProtocolMapper
(org.keycloak.protocol.oidc.mappers.OIDCAccessTokenMapper) to introduce
computed attributes to the access tokens.

You can find the predefined mappers in the package:
org/keycloak/protocol/oidc/mappers within the keycloak-services project.

Cheers,
Thomas
_______________________________________________
keycloak-user mailing list
keycloak-user at lists.jboss.org<mailto:keycloak-user at lists.jboss.org>
https://lists.jboss.org/mailman/listinfo/keycloak-user

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/keycloak-user/attachments/20160229/3d09c625/attachment.html 


More information about the keycloak-user mailing list