Class CompareAuthenticationHandler

    • 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 String getPasswordScheme()
        Returns the password scheme.
        Returns:
        password scheme
      • setPasswordScheme

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

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

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

        private byte[] digestCredential​(Credential credential,
                                        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