@Transactional(readOnly=true) public class LdapImpl extends AbstractLevel2Service implements ome.api.ILdap, org.springframework.context.ApplicationContextAware
SecuritySystem
,
Permissions
Modifier and Type | Class and Description |
---|---|
class |
LdapImpl.GroupLoader
Data class which stores the state of the
NewUserGroupBean and
NewUserGroupOwnerBean operations. |
iQuery, iUpdate, metadata, queryFactory, readOnlyStatus, sec
Constructor and Description |
---|
LdapImpl(org.springframework.ldap.core.ContextSource ctx,
org.springframework.ldap.core.LdapOperations ldap,
ome.system.Roles roles,
LdapConfig config,
RoleProvider roleProvider,
ome.util.SqlAction sql) |
Modifier and Type | Method and Description |
---|---|
ome.model.meta.Experimenter |
createUser(java.lang.String username)
Creates an
Experimenter based on the supplied LDAP username. |
ome.model.meta.Experimenter |
createUser(java.lang.String username,
java.lang.String password)
Creates an
Experimenter based on the supplied LDAP username. |
ome.model.meta.Experimenter |
createUser(java.lang.String username,
java.lang.String password,
boolean checkPassword)
Creates an
Experimenter based on the supplied LDAP username. |
boolean |
createUserFromLdap(java.lang.String username,
java.lang.String password)
Deprecated.
|
java.util.List<ome.model.meta.Experimenter> |
discover() |
java.util.List<ome.model.meta.ExperimenterGroup> |
discoverGroups() |
java.lang.String |
findDN(java.lang.String username) |
ome.model.meta.Experimenter |
findExperimenter(java.lang.String username) |
ome.model.meta.ExperimenterGroup |
findGroup(java.lang.String groupname) |
java.lang.String |
findGroupDN(java.lang.String groupname) |
java.lang.Class<? extends ome.api.ServiceInterface> |
getServiceInterface() |
boolean |
getSetting() |
java.util.List<java.lang.Long> |
loadLdapGroups(java.lang.String username,
org.springframework.ldap.core.DistinguishedName dn)
Deprecated.
|
java.lang.String |
lookupLdapAuthExperimenter(java.lang.Long id)
Queries the LDAP server and returns the DN for the specified OMERO user
ID.
|
java.util.List<java.util.Map<java.lang.String,java.lang.Object>> |
lookupLdapAuthExperimenters()
Queries the LDAP server and returns the DN for all OMERO users that have
the
ldap flag enabled. |
java.util.List<ome.model.meta.Experimenter> |
searchAll() |
java.util.List<ome.model.meta.Experimenter> |
searchByAttribute(java.lang.String dns,
java.lang.String attr,
java.lang.String value) |
java.util.List<ome.model.meta.Experimenter> |
searchByAttributes(java.lang.String dn,
java.lang.String[] attributes,
java.lang.String[] values) |
ome.model.meta.Experimenter |
searchByDN(java.lang.String dns) |
java.util.List<java.lang.String> |
searchDnInGroups(java.lang.String attr,
java.lang.String value) |
void |
setApplicationContext(org.springframework.context.ApplicationContext arg0) |
void |
setDN(java.lang.Long experimenterID,
java.lang.String dn)
Deprecated.
|
void |
synchronizeLdapUser(java.lang.String username) |
boolean |
validatePassword(java.lang.String dn,
java.lang.String password)
Validates password for base.
|
getBeanHelper, getExtendedMetadata, getQueryFactory, getSecuritySystem, selfConfigure, setExtendedMetadata, setQueryFactory, setQueryService, setReadOnlyStatus, setSecuritySystem, setUpdateService
public LdapImpl(org.springframework.ldap.core.ContextSource ctx, org.springframework.ldap.core.LdapOperations ldap, ome.system.Roles roles, LdapConfig config, RoleProvider roleProvider, ome.util.SqlAction sql)
public void setApplicationContext(org.springframework.context.ApplicationContext arg0) throws org.springframework.beans.BeansException
setApplicationContext
in interface org.springframework.context.ApplicationContextAware
org.springframework.beans.BeansException
public java.lang.Class<? extends ome.api.ServiceInterface> getServiceInterface()
getServiceInterface
in interface ome.system.SelfConfigurableService
public java.util.List<ome.model.meta.Experimenter> searchAll()
searchAll
in interface ome.api.ILdap
public java.util.List<ome.model.meta.Experimenter> searchByAttribute(java.lang.String dns, java.lang.String attr, java.lang.String value)
searchByAttribute
in interface ome.api.ILdap
public ome.model.meta.Experimenter searchByDN(java.lang.String dns)
searchByDN
in interface ome.api.ILdap
public java.lang.String findDN(java.lang.String username)
findDN
in interface ome.api.ILdap
public java.lang.String findGroupDN(java.lang.String groupname)
findGroupDN
in interface ome.api.ILdap
public ome.model.meta.Experimenter findExperimenter(java.lang.String username)
findExperimenter
in interface ome.api.ILdap
public ome.model.meta.ExperimenterGroup findGroup(java.lang.String groupname)
findGroup
in interface ome.api.ILdap
public java.util.List<java.lang.String> searchDnInGroups(java.lang.String attr, java.lang.String value)
searchDnInGroups
in interface ome.api.ILdap
public java.util.List<ome.model.meta.Experimenter> searchByAttributes(java.lang.String dn, java.lang.String[] attributes, java.lang.String[] values)
searchByAttributes
in interface ome.api.ILdap
@Transactional(readOnly=false) @Deprecated public void setDN(java.lang.Long experimenterID, java.lang.String dn)
setDN
in interface ome.api.ILdap
public boolean getSetting()
getSetting
in interface ome.api.ILdap
public void synchronizeLdapUser(java.lang.String username)
@Deprecated @Transactional(readOnly=false) public boolean createUserFromLdap(java.lang.String username, java.lang.String password)
Experimenter
based on the supplied LDAP username.
Doesn't validate the user's password and can be only executed by admin
users.username
- The user's LDAP username.password
- The user's LDAP password, not null.@Transactional(readOnly=false) public ome.model.meta.Experimenter createUser(java.lang.String username)
Experimenter
based on the supplied LDAP username.
Doesn't validate the user's password and can be only executed by admin
users.createUser
in interface ome.api.ILdap
username
- The user's LDAP username.Experimenter
object.public ome.model.meta.Experimenter createUser(java.lang.String username, java.lang.String password)
Experimenter
based on the supplied LDAP username.
Enforces user password validation.username
- The user's LDAP username.password
- The user's LDAP password, not null.Experimenter
object.public ome.model.meta.Experimenter createUser(java.lang.String username, java.lang.String password, boolean checkPassword)
Experimenter
based on the supplied LDAP username.
A boolean flag controls if password checks should be performed.username
- The user's LDAP username.password
- The user's password.checkPassword
- Flag indicating if password check should be performed.Experimenter
object.@Deprecated public java.util.List<java.lang.Long> loadLdapGroups(java.lang.String username, org.springframework.ldap.core.DistinguishedName dn)
public boolean validatePassword(java.lang.String dn, java.lang.String password)
dn
- the user's distinguished namepassword
- the user's passwordpublic java.util.List<java.util.Map<java.lang.String,java.lang.Object>> lookupLdapAuthExperimenters()
ldap
flag enabled.public java.lang.String lookupLdapAuthExperimenter(java.lang.Long id)
ldap
flag enabled.id
- The user ID.public java.util.List<ome.model.meta.Experimenter> discover()
discover
in interface ome.api.ILdap
public java.util.List<ome.model.meta.ExperimenterGroup> discoverGroups()
discoverGroups
in interface ome.api.ILdap