Class LdapAuthInfo


  • public class LdapAuthInfo
    extends java.lang.Object
    class for reading ldap authentication info from config store
    • Field Detail

      • logger

        public static org.slf4j.Logger logger
      • PROP_LDAPAUTHTYPE

        public static final java.lang.String PROP_LDAPAUTHTYPE
        See Also:
        Constant Field Values
      • PROP_CLIENTCERTNICKNAME

        public static final java.lang.String PROP_CLIENTCERTNICKNAME
        See Also:
        Constant Field Values
      • PROP_BINDPW_PROMPT

        public static final java.lang.String PROP_BINDPW_PROMPT
        See Also:
        Constant Field Values
      • PROP_BINDDN_DEFAULT

        public static final java.lang.String PROP_BINDDN_DEFAULT
        See Also:
        Constant Field Values
      • LDAP_BASICAUTH_STR

        public static final java.lang.String LDAP_BASICAUTH_STR
        See Also:
        Constant Field Values
      • LDAP_SSLCLIENTAUTH_STR

        public static final java.lang.String LDAP_SSLCLIENTAUTH_STR
        See Also:
        Constant Field Values
      • LDAP_AUTHTYPE_BASICAUTH

        public static final int LDAP_AUTHTYPE_BASICAUTH
        See Also:
        Constant Field Values
      • LDAP_AUTHTYPE_SSLCLIENTAUTH

        public static final int LDAP_AUTHTYPE_SSLCLIENTAUTH
        See Also:
        Constant Field Values
      • mType

        protected int mType
    • Constructor Detail

      • LdapAuthInfo

        public LdapAuthInfo()
        must call init(config) after this constructor.
    • Method Detail

      • getPasswordFromStore

        public java.lang.String getPasswordFromStore​(java.lang.String prompt)
                                              throws EBaseException
        Throws:
        EBaseException
      • init

        public void init​(LDAPAuthenticationConfig config,
                         java.lang.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 is null, the password will not be verified.
        port - The port that the directory server is running on.
        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
      • setPasswordStore

        public void setPasswordStore​(IPasswordStore passwordStore)
      • addPassword

        public void addPassword​(java.lang.String prompt,
                                java.lang.String pw)
        Add password to private password data structure.
        Parameters:
        prompt - Password prompt.
        pw - Password itself.
      • removePassword

        public void removePassword​(java.lang.String prompt)
        Remove password from private password data structure.
        Parameters:
        prompt - Identify password to remove with prompt.