Package gda.jython.authenticator
Class LdapMixin
java.lang.Object
gda.jython.authenticator.LdapMixin
Contains LDAP-related methods.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe LDAP environment property used to define the timeout for connecting to a socketstatic final StringThe LDAP environment property used to define the timeout for reading from a socketstatic final StringThe java property to use to define which class of Authenticator to use -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateContext(List<String> ldapURLs) Creates and connects to a new LDAP context given a set of URLsgenerateLdapEnv(List<String> ldapURLs) Generates environment variables for anLdapContextto use for authentication.Returns the LDAP URLs that should be used.searchLdapForUser(String fedId, String... requiredAtts) voidsetResolver(HostnameResolver resolver)
-
Field Details
-
LDAP_ENV_CONNECT_TIMEOUT
The LDAP environment property used to define the timeout for connecting to a socket- See Also:
-
LDAP_ENV_READ_TIMEOUT
The LDAP environment property used to define the timeout for reading from a socket- See Also:
-
LDAPSTAFFCONTEXT_PROPERTY
The java property to use to define which class of Authenticator to use- See Also:
-
-
Constructor Details
-
LdapMixin
public LdapMixin()
-
-
Method Details
-
setResolver
-
searchLdapForUser
-
createContext
Creates and connects to a new LDAP context given a set of URLs- Parameters:
ldapURLs- The set of URLs to try- Returns:
- A new
LdapContext - Throws:
NamingException
-
generateLdapEnv
Generates environment variables for anLdapContextto use for authentication. Must be aHashtabledue to requirements by a commonly used class implementingLdapContext,InitialLdapContext- Parameters:
ldapURLs- List of URLs to include in the environment- Returns:
- A new
Hashtable
-
getUrlsToTry
Returns the LDAP URLs that should be used.
-