public class LdapManager
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PERIODIC_SYNC_ENABLED |
static java.lang.String |
PERIODIC_SYNC_SCHEDULE |
Modifier and Type | Method and Description |
---|---|
Group |
getGroupFromDN(java.lang.String dn)
Returns a LDAP group from its distinguish name.
|
static LdapManager |
getInstance() |
LDAPConfiguration |
getLDAPConfiguration()
Returns the default LDAPConfiguration used by JCMS which you can give
to
LDAPMapper.LDAPMapper(LDAPConfiguration) to
connect to your LDAP server. |
LDAPConfiguration |
getLDAPConfigurationFromDN(java.lang.String dn)
Retrieve the LDAPConfiguration for the specific DN.
|
LDAPConfiguration |
getLDAPConfigurationFromDomain(java.lang.String domain)
Retrieve the LDAPConfiguration for the specific domain.
|
LDAPConfiguration |
getLDAPConfigurationFromLogin(java.lang.String login)
Retrieve the LDAPConfiguration to use based on the specified login.
|
java.util.List<LDAPConfiguration> |
getLDAPConfigurations()
Returns all LDAPConfiguration configured in JCMS.
|
void |
importAll()
Import all LDAP users (and their groups) in JCMS, updating existing data if any.
|
void |
initLDAP()
Initialize or Reinitialize LDAP configuration.
|
boolean |
isImportAllInProgress()
Checks if an import all operation is in progress.
|
boolean |
isLdapEnabled()
Checks if LDAP is enabled.
|
public static final java.lang.String PERIODIC_SYNC_ENABLED
public static final java.lang.String PERIODIC_SYNC_SCHEDULE
public static final LdapManager getInstance()
public void initLDAP()
public LDAPConfiguration getLDAPConfiguration()
LDAPMapper.LDAPMapper(LDAPConfiguration)
to
connect to your LDAP server.public LDAPConfiguration getLDAPConfigurationFromLogin(java.lang.String login)
If the specified login is a mail, a Windows UPN (User Principal Name) format, or
a down-level windows logon format (DOMAIN\sAMAccountName), the domain part is
extracted and the LDAP configuration will be read from properties
ldap.server.{DOMAIN}.*
(if available) instead of the
default ldap.server.*
properties.
Configuration alias can also be defined with property
ldap.conf-aliases.{domain}: confname
allowing several domain to
match on LDAP configuration.
login
- the login used to determine which configuration to usegetLDAPConfiguration()
.public LDAPConfiguration getLDAPConfigurationFromDomain(java.lang.String domain)
domain
- an optionnal configuration name or alias, as declared in ldap configuration
properties ldap.server.{domain}.*
or through LDAP configuration
alias declared in property ldap.conf-aliases.{domain}: confname
getLDAPConfiguration()
)public LDAPConfiguration getLDAPConfigurationFromDN(java.lang.String dn)
Look for the first LDAPConfiguration which has a matching baseDN,
tested on both user base DN (LDAPConfiguration.getSuffix()
)
and group base DN (LDAPConfiguration.getGroupSuffix()
).
dn
- an LDAP distinguish namegetLDAPConfiguration()
)public java.util.List<LDAPConfiguration> getLDAPConfigurations()
public void importAll()
For each LDAP configuration declared, this method retrieves all users
in the LDAP matching the current filters and then trigger the synchronisation
operation impletemented in the LdapAuthenticationHandler
:
create or update operation of corresponding Member and Group(s).
All existing LDAP Member not found during the LDAP search are also processed to disable them as needed.
public boolean isImportAllInProgress()
importAll()
is currently working, false otherwisepublic boolean isLdapEnabled()
public Group getGroupFromDN(java.lang.String dn)
dn
- the dn of the groupCopyright © 2001-2017 Jalios SA. All Rights Reserved.