Class KeycloakUserMapper
java.lang.Object
org.nuxeo.ecm.platform.ui.web.keycloak.KeycloakUserMapper
- All Implemented Interfaces:
UserMapper
Plugin for the UserMapper to manage mapping between Ketcloack user and Nuxeo counterpart
- Since:
- 7.4
-
Field Summary
Modifier and TypeFieldDescriptionprotected static String
protected UserManager
protected static String
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetOrCreateAndUpdateNuxeoPrincipal
(Object userObject) Should retrieve (create if needed) and update the NuxeoPrincipal according to the given userObjectgetOrCreateAndUpdateNuxeoPrincipal
(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 callback to receive the parameters set inside the descriptorvoid
release()
Release callback : called when the plugin is about to be unloadedwrapNuxeoPrincipal
(NuxeoPrincipal principal, Object nativePrincipal, Map<String, Serializable> params) Wrap theNuxeoPrincipal
as the userObject used in the external authentication system
-
Field Details
-
userSchemaName
-
groupSchemaName
-
userManager
-
-
Constructor Details
-
KeycloakUserMapper
public KeycloakUserMapper()
-
-
Method Details
-
getOrCreateAndUpdateNuxeoPrincipal
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
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
-