[keycloak-dev] How to do default claim mappings?

Bill Burke bburke at redhat.com
Fri Feb 20 10:47:39 EST 2015


Per realm and per protocol (saml or OIDC), I'm going to need to register 
a set of default claim mappers into storage.  ProviderFactorys are 
loaded at boot time and each of their init() methods is invoked.  I'm 
thinking of adding a new method to ProviderFactory

void preprocess(KeycloakSessionFactory sessionFactory);

This would be called after all providers have been loaded.  This would 
allow the OIDC and SAML providers to browser every realm to make sure 
the appropriate built in claim mappers have been registered.

I'm also thinking of adding a RealmCreationListener registration method 
on RealmProvider.  Within ProviderFactory.preprocess() components could 
register themselves with the RealmProvider for realm creation events so 
that they could add additional metadata specific to their plugin.

-- 
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com


More information about the keycloak-dev mailing list