|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.northwestern.at.utils.net.ldap.LdapQueryAttributes
public class LdapQueryAttributes
Returns LDAP attributes for a search query involving one or more attributes.
Method Summary | |
---|---|
static java.util.Map |
attributesToMap(javax.naming.directory.Attributes attributes)
Convert LDAP attributes to map. |
static javax.naming.directory.Attributes |
getAttributes(java.lang.String userName,
java.lang.String ldapURL,
java.lang.String ldapPrincipal)
Retrieve attributes for an LDAP principal from an LDAP server. |
static java.util.List |
getAttributes(java.lang.String userName,
java.lang.String password,
java.lang.String ldapURL,
java.lang.String ldapPrincipal,
javax.naming.directory.Attributes ldapSearchAttributes,
java.lang.String keystore,
boolean useSSL,
boolean acceptAnyCert)
Retrieve attributes from an LDAP server. |
static java.util.Map[] |
getAttributesMap(javax.naming.directory.Attributes ldapSearchAttributes,
java.lang.String ldapURL,
java.lang.String ldapPrincipal)
Retrieve attributes from an LDAP server as a map. |
static java.util.Map[] |
getAttributesMap(java.lang.String userName,
java.lang.String ldapURL,
java.lang.String ldapPrincipal)
Retrieve attributes for an LDAP principal from an LDAP server as a map. |
static java.util.Map[] |
getAttributesMap(java.lang.String userName,
java.lang.String password,
java.lang.String ldapURL,
java.lang.String ldapPrincipal,
javax.naming.directory.Attributes ldapSearchAttributes,
java.lang.String keystore,
boolean useSSL,
boolean acceptAnyCert)
Retrieve attributes for an LDAP principal from an LDAP server as a map. |
protected static boolean |
urlSpecifiesLDAPS(java.lang.String ldapURL)
Check if specified URL specifies LDAPS protocol. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static java.util.List getAttributes(java.lang.String userName, java.lang.String password, java.lang.String ldapURL, java.lang.String ldapPrincipal, javax.naming.directory.Attributes ldapSearchAttributes, java.lang.String keystore, boolean useSSL, boolean acceptAnyCert) throws javax.naming.NamingException
userName
- The user name.password
- The user password.ldapURL
- The LDAP service URL.ldapPrincipal
- The LDAP principal string.ldapSearchAttributes
- The LDAP search attributes.
May be null.keystore
- The path to the SSL keystore if a
non-standard certificate is used.
Set to the empty string if not needed.useSSL
- True to use SSL connection.acceptAnyCert
- True to accept any certificate as valid.
The keystore is ignored.
javax.naming.NamingException
- If query fails. If exception is
not thrown, query succeeded, but may return
empty attributes. public static javax.naming.directory.Attributes getAttributes(java.lang.String userName, java.lang.String ldapURL, java.lang.String ldapPrincipal) throws javax.naming.NamingException
userName
- The user name.ldapURL
- The LDAP service URL.ldapPrincipal
- The LDAP principal string.
javax.naming.NamingException
- if authentication fails. If exception is
not thrown, authentication succeeded. public static java.util.Map attributesToMap(javax.naming.directory.Attributes attributes) throws javax.naming.NamingException
attributes
- The LDAP attributes.
javax.naming.NamingException
- if not thrown, mapping succeeded. public static java.util.Map[] getAttributesMap(java.lang.String userName, java.lang.String password, java.lang.String ldapURL, java.lang.String ldapPrincipal, javax.naming.directory.Attributes ldapSearchAttributes, java.lang.String keystore, boolean useSSL, boolean acceptAnyCert) throws javax.naming.NamingException
userName
- The user name.password
- The user password.ldapURL
- The LDAP service URL.ldapPrincipal
- The LDAP principal string.keystore
- The path to the SSL keystore if a non-standard
certificate is used. Set to the empty
string if not needed.useSSL
- True to use SSL connection.acceptAnyCert
- True to accept any certificate as valid.
The keystore is ignored.
javax.naming.NamingException
- if authentication fails. If exception is
not thrown, authentication succeeded. public static java.util.Map[] getAttributesMap(java.lang.String userName, java.lang.String ldapURL, java.lang.String ldapPrincipal) throws javax.naming.NamingException
userName
- The user name.ldapURL
- The LDAP service URL.ldapPrincipal
- The LDAP principal string.
javax.naming.NamingException
- if authentication fails. If exception is
not thrown, authentication succeeded. public static java.util.Map[] getAttributesMap(javax.naming.directory.Attributes ldapSearchAttributes, java.lang.String ldapURL, java.lang.String ldapPrincipal) throws javax.naming.NamingException
ldapSearchAttributes
- The LDAP search attributes.ldapURL
- The LDAP service URL.ldapPrincipal
- The LDAP principal string.
javax.naming.NamingException
- if LDAP lookup fails. protected static boolean urlSpecifiesLDAPS(java.lang.String ldapURL)
ldapURL
- The LDAP URL.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |