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
FieldsModifier and TypeFieldDescriptionprotected static Stringprotected UserManagerprotected static String -
Constructor Summary
Constructors -
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 userObjectvoidInit callback to receive the parameters set inside the descriptorvoidrelease()Release callback : called when the plugin is about to be unloadedwrapNuxeoPrincipal(NuxeoPrincipal principal, Object nativePrincipal, Map<String, Serializable> params) Wrap theNuxeoPrincipalas 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: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
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
-