public class KeycloakUserMapper extends Object implements UserMapper
Modifier and Type | Field and Description |
---|---|
protected static String |
groupSchemaName |
protected UserManager |
userManager |
protected static String |
userSchemaName |
Constructor and Description |
---|
KeycloakUserMapper() |
Modifier and Type | Method and Description |
---|---|
NuxeoPrincipal |
getOrCreateAndUpdateNuxeoPrincipal(Object userObject)
Should retrieve (create if needed) and update the NuxeoPrincipal according to the given userObject
|
NuxeoPrincipal |
getOrCreateAndUpdateNuxeoPrincipal(Object userObject,
boolean createIfNeeded,
boolean update,
Map<String,Serializable> params)
Should retrieve (create if needed) and update the NuxeoPrincipal according to the given userObject
|
void |
init(Map<String,String> params)
Init callback to receive the parameters set inside the descriptor
|
void |
release()
Release callback : called when the plugin is about to be unloaded
|
Object |
wrapNuxeoPrincipal(NuxeoPrincipal principal,
Object nativePrincipal,
Map<String,Serializable> params)
Wrap the
NuxeoPrincipal as the userObject used in the external authentication system |
protected static String userSchemaName
protected static String groupSchemaName
protected UserManager userManager
public KeycloakUserMapper()
public NuxeoPrincipal getOrCreateAndUpdateNuxeoPrincipal(Object userObject)
UserMapper
getOrCreateAndUpdateNuxeoPrincipal
in interface UserMapper
userObject
- the object representing the user in the external systempublic NuxeoPrincipal getOrCreateAndUpdateNuxeoPrincipal(Object userObject, boolean createIfNeeded, boolean update, Map<String,Serializable> params)
UserMapper
getOrCreateAndUpdateNuxeoPrincipal
in interface UserMapper
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)public void init(Map<String,String> params) throws Exception
UserMapper
init
in interface UserMapper
Exception
public Object wrapNuxeoPrincipal(NuxeoPrincipal principal, Object nativePrincipal, Map<String,Serializable> params)
UserMapper
NuxeoPrincipal
as the userObject used in the external authentication systemwrapNuxeoPrincipal
in interface UserMapper
principal
- the NuxeoPrincipalnativePrincipal
- the native object to represent the principal in the target systempublic void release()
UserMapper
release
in interface UserMapper
Copyright © 2016 Nuxeo SA. All rights reserved.