Example usage for org.springframework.security.ldap.authentication PasswordComparisonAuthenticator PasswordComparisonAuthenticator

List of usage examples for org.springframework.security.ldap.authentication PasswordComparisonAuthenticator PasswordComparisonAuthenticator

Introduction

In this page you can find the example usage for org.springframework.security.ldap.authentication PasswordComparisonAuthenticator PasswordComparisonAuthenticator.

Prototype

public PasswordComparisonAuthenticator(BaseLdapPathContextSource contextSource) 

Source Link

Usage

From source file:io.gravitee.management.idp.ldap.authentication.LdapAuthenticationProviderConfigurer.java

/**
 * Creates {@link PasswordComparisonAuthenticator}
 *
 * @param contextSource the {@link BaseLdapPathContextSource} to use
 * @return/* w w w.j a v  a  2s . c  o m*/
 */
private PasswordComparisonAuthenticator createPasswordCompareAuthenticator(
        BaseLdapPathContextSource contextSource) {
    PasswordComparisonAuthenticator ldapAuthenticator = new PasswordComparisonAuthenticator(contextSource);
    if (passwordAttribute != null) {
        ldapAuthenticator.setPasswordAttributeName(passwordAttribute);
    }
    ldapAuthenticator.setPasswordEncoder(passwordEncoder);
    return ldapAuthenticator;
}