Class UserPwdDirAuthentication

    • Field Detail

      • logger

        public static org.slf4j.Logger logger
      • mAttr

        public java.lang.String mAttr
      • mRequiredCreds

        protected java.lang.String[] mRequiredCreds
      • mAttrName

        protected java.lang.String mAttrName
      • mAttrDesc

        protected java.lang.String mAttrDesc
      • mConfigParams

        protected static java.lang.String[] mConfigParams
    • Constructor Detail

      • UserPwdDirAuthentication

        public UserPwdDirAuthentication()
        Default constructor, initialization must follow.
    • Method Detail

      • init

        public void init​(java.lang.String name,
                         java.lang.String implName,
                         AuthManagerConfig config)
                  throws EBaseException
        Initializes the UserPwdDirAuthentication auth manager.

        Specified by:
        init in interface AuthManager
        Overrides:
        init in class DirBasedAuthentication
        Parameters:
        name - - The name for this authentication manager instance.
        implName - - The name of the authentication manager plugin.
        config - - The configuration store for this instance.
        Throws:
        EBaseException - If an error occurs during initialization.
      • authenticate

        protected java.lang.String authenticate​(netscape.ldap.LDAPConnection conn,
                                                com.netscape.certsrv.authentication.IAuthCredentials authCreds,
                                                AuthToken token)
                                         throws EBaseException
        Authenticates a user based on attr, pwd in the directory.
        Specified by:
        authenticate in class DirBasedAuthentication
        Parameters:
        authCreds - The authentication credentials.
        Returns:
        The user's ldap entry dn.
        Throws:
        com.netscape.certsrv.authentication.EInvalidCredentials - If the attr and password are not valid
        EBaseException - If an internal error occurs.
      • getConfigParams

        public java.lang.String[] getConfigParams()
        Returns a list of configuration parameter names. The list is passed to the configuration console so instances of this implementation can be configured through the console.
        Specified by:
        getConfigParams in interface AuthManager
        Specified by:
        getConfigParams in class DirBasedAuthentication
        Returns:
        String array of configuration parameter names.
      • init

        public void init​(Profile profile,
                         IConfigStore config)
                  throws com.netscape.certsrv.profile.EProfileException
        Description copied from interface: ProfileAuthenticator
        Initializes this default policy.
        Specified by:
        init in interface ProfileAuthenticator
        Parameters:
        profile - owner of this authenticator
        config - configuration store
        Throws:
        com.netscape.certsrv.profile.EProfileException - failed to initialize
      • getName

        public java.lang.String getName​(java.util.Locale locale)
        Retrieves the localizable name of this policy.
        Specified by:
        getName in interface ProfileAuthenticator
        Parameters:
        locale - end user locale
        Returns:
        localized authenticator name
      • getText

        public java.lang.String getText​(java.util.Locale locale)
        Retrieves the localizable description of this policy.
        Specified by:
        getText in interface ProfileAuthenticator
        Parameters:
        locale - end user locale
        Returns:
        localized authenticator description
      • getValueNames

        public java.util.Enumeration<java.lang.String> getValueNames()
        Retrieves a list of names of the value parameter.
        Specified by:
        getValueNames in interface ProfileAuthenticator
        Returns:
        a list of property names
      • isValueWriteable

        public boolean isValueWriteable​(java.lang.String name)
        Description copied from interface: ProfileAuthenticator
        Checks if the value of the given property should be serializable into the request. Passsword or other security-related value may not be desirable for storage.
        Specified by:
        isValueWriteable in interface ProfileAuthenticator
        Parameters:
        name - property name
        Returns:
        true if the property is not security related
      • getValueDescriptor

        public com.netscape.certsrv.property.IDescriptor getValueDescriptor​(java.util.Locale locale,
                                                                            java.lang.String name)
        Retrieves the descriptor of the given value parameter by name.
        Specified by:
        getValueDescriptor in interface ProfileAuthenticator
        Parameters:
        locale - user locale
        name - property name
        Returns:
        descriptor of the requested property
      • populate

        public void populate​(com.netscape.certsrv.authentication.IAuthToken token,
                             com.netscape.certsrv.request.IRequest request)
                      throws com.netscape.certsrv.profile.EProfileException
        Description copied from interface: ProfileAuthenticator
        Populates authentication specific information into the request for auditing purposes.
        Specified by:
        populate in interface ProfileAuthenticator
        Parameters:
        token - authentication token
        request - request
        Throws:
        com.netscape.certsrv.profile.EProfileException - failed to populate
      • isSSLClientRequired

        public boolean isSSLClientRequired()
        Description copied from interface: ProfileAuthenticator
        Checks if this authenticator requires SSL client authentication.
        Specified by:
        isSSLClientRequired in interface ProfileAuthenticator
        Returns:
        client authentication required or not