[keycloak-user] Build token parameters over an API

Marek Posolda mposolda at redhat.com
Mon Jan 30 03:55:32 EST 2017


We have bunch of examples in the distribution. Not for the 
protocolMapper though, but still, it is probably useful for the 
inspiration. See folder "provider" in the examples dist.

Also note that for the protocolMapper, you would likely need to 
implement some other interfaces besides just the protocolMapper 
interface. For example OIDCAccessTokenMapper (if you use OIDC protocol) 
etc. See the builtin Keycloak implementations for more details.

Marek

On 30/01/17 09:24, Avinash Kundaliya wrote:
> I realized after reading through past conversations that what i need is
> a protocol mapper but now i am struggling to get one working. Here's
> what i am doing right now:
>
> 1) created a class that implements the ProtocolMapper interface
> 2) created a jar with that class and package (i'm not sure what the
> META-INF/services folder should contain, any pointers for tha?)
> 3) put the jar in the providers folder (as the readme in the folder says)
>
> Is there a jar that i can use for inspiration or as a base? Any help or
> pointers would be apprecited.
>
> Regards,
> Avinash
>
>
> On 1/25/17 23:49, Avinash Kundaliya wrote:
>> Hello, I have been thinking If it's possible to create a custom mapper
>> that could call an API and add some parameters (or sub parameters) to
>> the JWT Token that is generated? If yes, are there any examples how to
>> do so and what data is available to the mapper? ( the user? Requested
>> scope? ...) Regards, Avinash
> _______________________________________________
> keycloak-user mailing list
> keycloak-user at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/keycloak-user




More information about the keycloak-user mailing list