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 String
groupSchemaName
protected UserManager
userManager
protected static String
userSchemaName
-
Constructor Summary
Constructors Constructor Description KeycloakUserMapper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NuxeoPrincipal
getOrCreateAndUpdateNuxeoPrincipal(Object userObject)
Should retrieve (create if needed) and update the NuxeoPrincipal according to the given userObjectNuxeoPrincipal
getOrCreateAndUpdateNuxeoPrincipal(Object userObject, boolean createIfNeeded, boolean update, Map<String,Serializable> params)
Should retrieve (create if needed) and update the NuxeoPrincipal according to the given userObjectvoid
init(Map<String,String> params)
Init callback to receive the parameters set inside the descriptorvoid
release()
Release callback : called when the plugin is about to be unloadedObject
wrapNuxeoPrincipal(NuxeoPrincipal principal, Object nativePrincipal, Map<String,Serializable> params)
Wrap theNuxeoPrincipal
as 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:UserMapper
Should retrieve (create if needed) and update the NuxeoPrincipal according to the given userObject- Specified by:
getOrCreateAndUpdateNuxeoPrincipal
in 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:UserMapper
Should retrieve (create if needed) and update the NuxeoPrincipal according to the given userObject- Specified by:
getOrCreateAndUpdateNuxeoPrincipal
in 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:UserMapper
Init callback to receive the parameters set inside the descriptor- Specified by:
init
in interfaceUserMapper
- Throws:
Exception
-
wrapNuxeoPrincipal
public Object wrapNuxeoPrincipal(NuxeoPrincipal principal, Object nativePrincipal, Map<String,Serializable> params)
Description copied from interface:UserMapper
Wrap theNuxeoPrincipal
as the userObject used in the external authentication system- Specified by:
wrapNuxeoPrincipal
in interfaceUserMapper
- Parameters:
principal
- the NuxeoPrincipalnativePrincipal
- the native object to represent the principal in the target system
-
release
public void release()
Description copied from interface:UserMapper
Release callback : called when the plugin is about to be unloaded- Specified by:
release
in interfaceUserMapper
-
-