public interface LdapAttributeMapper
| Modifier and Type | Method and Description |
|---|---|
String |
escapeSearchFilterTerm(String term)
Scrubs the given search filter term (i.e. a value to be matched, or not,
in a search predicate) for reserved characters.
|
String |
getAttributeMapping(String key)
Map the given logical attribute name to a physical attribute name.
|
Map<String,String> |
getAttributeMappings()
Access the current directory attribute map.
|
String |
getFindUserByAidFilter(String aid)
Output a filter string for searching the directory with
the specified user aid as a key.
|
String |
getFindUserByCrossAttributeSearchFilter(String criteria)
Builds a filter to perform a wildcard search for criteria in uid, email, first name or last name
In order to minimise hitting the limits of searches, this only performs a wildcard match on anything after
the supplied criteria.
|
String |
getFindUserByEidFilter(String eid)
Output a filter string for searching the directory with
the specified user eid as a key.
|
String |
getFindUserByEmailFilter(String emailAddr)
Output a filter string for searching the directory with
the specified email address as a key.
|
String |
getManyUsersInOneSearch(Set<String> criteria)
Builds a filter to a uid search against many users at once
For reference, the LDAP search filter is of the form:
"(|(uid=sample.user)(uid=john.doe)(uid=jane.smith))"
|
String[] |
getSearchResultAttributes()
Access the standard attributes returned from any given
directory search.
|
String |
getUserBindDn(LdapUserData userData)
Determine the DN to which to bind when executing an authentication
attempt for the given user.
|
void |
init()
Complete internal configuration.
|
void |
mapLdapEntryOntoUserData(com.unboundid.ldap.sdk.migrate.ldapjdk.LDAPEntry ldapEntry,
LdapUserData userData)
Maps attribites from the specified
LDAPEntry onto
a LdapUserData. |
void |
mapUserDataOntoUserEdit(LdapUserData userData,
UserEdit userEdit)
Maps attribites from the specified
LdapUserData onto
a UserEdit. |
void |
setAttributeMappings(Map<String,String> attributeMappings)
Assign the directory attribute map.
|
void init()
String getFindUserByEmailFilter(String emailAddr)
emailAddr - an email address to search onString getFindUserByEidFilter(String eid)
eid - a user eid to search onString getFindUserByAidFilter(String aid)
aid - a user authentication id.void mapLdapEntryOntoUserData(com.unboundid.ldap.sdk.migrate.ldapjdk.LDAPEntry ldapEntry,
LdapUserData userData)
LDAPEntry onto
a LdapUserData.ldapEntry - a non-null directory entry to mapuserData - a non-null user cache entryvoid mapUserDataOntoUserEdit(LdapUserData userData, UserEdit userEdit)
LdapUserData onto
a UserEdit.userData - a non-null user cache entryuserEdit - a non-null user domain objectString[] getSearchResultAttributes()
Map<String,String> getAttributeMappings()
void setAttributeMappings(Map<String,String> attributeMappings)
attributeMappings - the attribute map.String getAttributeMapping(String key)
key - the logical attribute nameString escapeSearchFilterTerm(String term)
term - The string value to be scrubbednull if the received String is null, otherwise
a copy of the received String with reserved characters escaped.String getUserBindDn(LdapUserData userData)
LdapUserData
by this LdapAttributeMapper. For example, the mapper
could have cached the DN in the user's property map, or the bind DN could
be reliably calculated from a combination of the user's eid
and some other configured RDN string.userData - a mapped collection of user attributes from which
to derive a bindable DN. Should not be nulluserData or
null if the DN is not known.String getFindUserByCrossAttributeSearchFilter(String criteria)
In order to minimise hitting the limits of searches, this only performs a wildcard match on anything after
the supplied criteria.
For example, a search for 'john' will match 'john' and 'johnson' but not 'gudjohnsen'.
For reference, the LDAP search filter is of the form: "(|(uid=criteria*)(mail=criteria*)(givenName=criteria*)(sn=criteria*))"
the - search stringString getManyUsersInOneSearch(Set<String> criteria)
the - search stringCopyright © 2005–2019 Sakai Project Contributor see (see NOTICE.txt). All rights reserved.