Class CompareAuthenticationHandler

    • Field Detail

      • DEFAULT_SCHEME

        protected static final java.lang.String DEFAULT_SCHEME
        Default password scheme. Value is "SHA:SHA".
        See Also:
        Constant Field Values
      • DEFAULT_ATTRIBUTE

        protected static final java.lang.String DEFAULT_ATTRIBUTE
        Default password attribute. Value is "userPassword".
        See Also:
        Constant Field Values
    • Constructor Detail

      • CompareAuthenticationHandler

        public CompareAuthenticationHandler()
        Default constructor.
      • CompareAuthenticationHandler

        public CompareAuthenticationHandler​(ConnectionFactory cf)
        Creates a new compare authentication handler.
        Parameters:
        cf - connection factory
    • Method Detail

      • getPasswordScheme

        public java.lang.String getPasswordScheme()
        Returns the password scheme.
        Returns:
        password scheme
      • setPasswordScheme

        public void setPasswordScheme​(java.lang.String s)
        Sets the password scheme.
        Parameters:
        s - password scheme
      • getPasswordAttribute

        public java.lang.String getPasswordAttribute()
        Returns the password attribute.
        Returns:
        password attribute
      • setPasswordAttribute

        public void setPasswordAttribute​(java.lang.String s)
        Sets the password attribute. Must equal a readable attribute in LDAP scheme.
        Parameters:
        s - password attribute
      • digestCredential

        protected byte[] digestCredential​(Credential credential,
                                          java.lang.String algorithm)
                                   throws LdapException
        Digests the supplied credential using the supplied algorithm.
        Parameters:
        credential - to digest
        algorithm - type of digest to use
        Returns:
        digested credential
        Throws:
        LdapException - if the supplied algorithm cannot be found
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object