public class NashornUserMapper extends AbstractUserMapper
UserMapper
implementation using Nashorn to implement logic using JavaScriptModifier and Type | Field and Description |
---|---|
protected ScriptEngine |
engine |
protected String |
mapperSource |
protected String |
wrapperSource |
log, userManager
Constructor and Description |
---|
NashornUserMapper(String mapperScript,
String wrapperScript) |
Modifier and Type | Method and Description |
---|---|
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
|
protected void |
resolveAttributes(Object userObject,
Map<String,Serializable> searchAttributes,
Map<String,Serializable> userAttributes,
Map<String,Serializable> profileAttributes) |
Object |
wrapNuxeoPrincipal(NuxeoPrincipal principal,
Object userObject,
Map<String,Serializable> params)
Wrap the
NuxeoPrincipal as the userObject used in the external authentication system |
createPrincipal, getOrCreateAndUpdateNuxeoPrincipal, getOrCreateAndUpdateNuxeoPrincipal, updatePrincipal, updateProfile
protected ScriptEngine engine
protected final String mapperSource
protected final String wrapperSource
public NashornUserMapper(String mapperScript, String wrapperScript)
public Object wrapNuxeoPrincipal(NuxeoPrincipal principal, Object userObject, Map<String,Serializable> params)
UserMapper
NuxeoPrincipal
as the userObject used in the external authentication systemprincipal
- the NuxeoPrincipaluserObject
- the native object to represent the principal in the target systempublic void init(Map<String,String> params) throws Exception
UserMapper
Exception
public void release()
UserMapper
protected void resolveAttributes(Object userObject, Map<String,Serializable> searchAttributes, Map<String,Serializable> userAttributes, Map<String,Serializable> profileAttributes)
resolveAttributes
in class AbstractUserMapper
Copyright © 2016 Nuxeo SA. All rights reserved.