Ah, clear. Thanks a lot! That is exactly what we were looking for.
On 15 Feb 2016, at 17:31, Bill Burke <bburke(a)redhat.com>
wrote:
Search documentation for how to add a provider. It works the same for protocol mapper.
You just need to have that /META-INF/services file in the jar that contains your mapper
classes. You deploy that jar, and it should work. Again, there is documentation for
other SPIs, packaging would work the same for protocol mapper.
On 2/15/2016 11:03 AM, Edgar Vonk - Info.nl wrote:
> Thanks Bill! We found this out indeed and managed to create our own mapper as a
spike. Creating the Java class is easy enough and fine as it is. You also need to add the
mapper to the list of available mappers in:
>
https://github.com/keycloak/keycloak/blob/master/services/src/main/resour...
>
> Our challenge now lies in how to integrate these code changes into our (Docker based)
build proces. Ideally we do not want to have to build Keycloak itself from source code. We
really only want to build our custom mapper and somehow add it to the Keycloak
distribution if at all possible. The Java class is the easy part I guess, but adding the
mapper definition to the META-INF file seems a little harder.
>
> cheers
>
>
>> On 15 Feb 2016, at 16:39, Bill Burke <bburke(a)redhat.com> wrote:
>>
>> There is an SPI, but it is unpublished. I haven't had time to polish it
>> or document it. You can use it, but we can't guarantee it won't change.
>>
>>
https://github.com/keycloak/keycloak/tree/master/services/src/main/java/o...
>>
>>
>>
>> On 2/15/2016 8:10 AM, Edgar Vonk - Info.nl wrote:
>>> Hi,
>>>
>>> We want to write our own custom protocol mapper where we add custom dynamic
user attributes to the JWT tokens by querying our custom database.
>>>
>>> However if I not mistaken there is no SPI for adding custom mappers? How
would we go about adding our own protocol mapper most easily?
>>>
>>> cheers
>>>
>>> Edgar
>>> _______________________________________________
>>> keycloak-user mailing list
>>> keycloak-user(a)lists.jboss.org
>>>
https://lists.jboss.org/mailman/listinfo/keycloak-user
>> --
>> Bill Burke
>> JBoss, a division of Red Hat
>>
http://bill.burkecentral.com
>>
>> _______________________________________________
>> keycloak-user mailing list
>> keycloak-user(a)lists.jboss.org
>>
https://lists.jboss.org/mailman/listinfo/keycloak-user
--
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com