Class KeycloakUserMapper
- java.lang.Object
-
- org.nuxeo.ecm.platform.ui.web.keycloak.KeycloakUserMapper
-
- All Implemented Interfaces:
UserMapper
public class KeycloakUserMapper extends Object implements UserMapper
Plugin for the UserMapper to manage mapping between Ketcloack user and Nuxeo counterpart- Since:
- 7.4
-
-
Field Summary
Fields Modifier and Type Field Description protected static StringgroupSchemaNameprotected UserManageruserManagerprotected static StringuserSchemaName
-
Constructor Summary
Constructors Constructor Description KeycloakUserMapper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NuxeoPrincipalgetOrCreateAndUpdateNuxeoPrincipal(Object userObject)Should retrieve (create if needed) and update the NuxeoPrincipal according to the given userObjectNuxeoPrincipalgetOrCreateAndUpdateNuxeoPrincipal(Object userObject, boolean createIfNeeded, boolean update, Map<String,Serializable> params)Should retrieve (create if needed) and update the NuxeoPrincipal according to the given userObjectvoidinit(Map<String,String> params)Init callback to receive the parameters set inside the descriptorvoidrelease()Release callback : called when the plugin is about to be unloadedObjectwrapNuxeoPrincipal(NuxeoPrincipal principal, Object nativePrincipal, Map<String,Serializable> params)Wrap theNuxeoPrincipalas the userObject used in the external authentication system
-
-
-
Field Detail
-
userSchemaName
protected static String userSchemaName
-
groupSchemaName
protected static String groupSchemaName
-
userManager
protected UserManager userManager
-
-
Constructor Detail
-
KeycloakUserMapper
public KeycloakUserMapper()
-
-
Method Detail
-
getOrCreateAndUpdateNuxeoPrincipal
public NuxeoPrincipal getOrCreateAndUpdateNuxeoPrincipal(Object userObject)
Description copied from interface:UserMapperShould retrieve (create if needed) and update the NuxeoPrincipal according to the given userObject- Specified by:
getOrCreateAndUpdateNuxeoPrincipalin interfaceUserMapper- Parameters:
userObject- the object representing the user in the external system
-
getOrCreateAndUpdateNuxeoPrincipal
public NuxeoPrincipal getOrCreateAndUpdateNuxeoPrincipal(Object userObject, boolean createIfNeeded, boolean update, Map<String,Serializable> params)
Description copied from interface:UserMapperShould retrieve (create if needed) and update the NuxeoPrincipal according to the given userObject- Specified by:
getOrCreateAndUpdateNuxeoPrincipalin interfaceUserMapper- Parameters:
userObject- the object representing the user in the external systemcreateIfNeeded- flag to allow creation (default is true)update- flag to run update (default is true)
-
init
public void init(Map<String,String> params) throws Exception
Description copied from interface:UserMapperInit callback to receive the parameters set inside the descriptor- Specified by:
initin interfaceUserMapper- Throws:
Exception
-
wrapNuxeoPrincipal
public Object wrapNuxeoPrincipal(NuxeoPrincipal principal, Object nativePrincipal, Map<String,Serializable> params)
Description copied from interface:UserMapperWrap theNuxeoPrincipalas the userObject used in the external authentication system- Specified by:
wrapNuxeoPrincipalin interfaceUserMapper- Parameters:
principal- the NuxeoPrincipalnativePrincipal- the native object to represent the principal in the target system
-
release
public void release()
Description copied from interface:UserMapperRelease callback : called when the plugin is about to be unloaded- Specified by:
releasein interfaceUserMapper
-
-