Package com.netscape.cmscore.ldapconn
Class LdapAuthInfo
java.lang.Object
com.netscape.cmscore.ldapconn.LdapAuthInfo
class for reading ldap authentication info from config store
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addPassword
(String prompt, String pw) Add password to private password data structure.int
get authentication type.getPasswordFromStore
(String prompt) void
init
(LDAPAuthenticationConfig config) initialize this class from the config store.void
init
(LDAPAuthenticationConfig config, String host, int port, boolean secure) initialize this class from the config store, and verify the password.void
removePassword
(String prompt) Remove password from private password data structure.void
reset()
void
setPasswordStore
(PasswordStore passwordStore)
-
Field Details
-
logger
public static final org.slf4j.Logger logger -
PROP_LDAPAUTHTYPE
- See Also:
-
PROP_CLIENTCERTNICKNAME
- See Also:
-
PROP_BINDDN
- See Also:
-
PROP_BINDPW
- See Also:
-
PROP_BINDPW_PROMPT
- See Also:
-
PROP_BINDDN_DEFAULT
- See Also:
-
LDAP_BASICAUTH_STR
- See Also:
-
LDAP_SSLCLIENTAUTH_STR
- See Also:
-
LDAP_AUTHTYPE_NONE
public static final int LDAP_AUTHTYPE_NONE- See Also:
-
LDAP_AUTHTYPE_BASICAUTH
public static final int LDAP_AUTHTYPE_BASICAUTH- See Also:
-
LDAP_AUTHTYPE_SSLCLIENTAUTH
public static final int LDAP_AUTHTYPE_SSLCLIENTAUTH- See Also:
-
mType
protected int mType
-
-
Constructor Details
-
LdapAuthInfo
public LdapAuthInfo()must call init(config) after this constructor.
-
-
Method Details
-
getPasswordFromStore
-
init
initialize this class from the config store.- Throws:
EBaseException
-
init
public void init(LDAPAuthenticationConfig config, String host, int port, boolean secure) throws EBaseException initialize this class from the config store, and verify the password.- Parameters:
host
- The host that the directory server is running on. This will be used to verify the password by attempting to connect. If it isnull
, the password will not be verified.port
- The port that the directory server is running on.- Throws:
EBaseException
-
getBindDN
- Throws:
EBaseException
-
getBindPassword
- Throws:
EBaseException
-
getClientCertNickname
- Throws:
EBaseException
-
reset
public void reset() -
getAuthType
public int getAuthType()get authentication type.- Returns:
- one of:
LdapAuthInfo.LDAP_AUTHTYPE_BASICAUTH or LdapAuthInfo.LDAP_AUTHTYPE_SSLCLIENTAUTH
-
getPasswordStore
-
setPasswordStore
-
addPassword
Add password to private password data structure.- Parameters:
prompt
- Password prompt.pw
- Password itself.
-
removePassword
Remove password from private password data structure.- Parameters:
prompt
- Identify password to remove with prompt.
-