Class LdapPasswordComparisonAuthenticationManagerFactory
java.lang.Object
org.springframework.security.config.ldap.AbstractLdapAuthenticationManagerFactory<PasswordComparisonAuthenticator>
org.springframework.security.config.ldap.LdapPasswordComparisonAuthenticationManagerFactory
public class LdapPasswordComparisonAuthenticationManagerFactory
extends AbstractLdapAuthenticationManagerFactory<PasswordComparisonAuthenticator>
Creates an
AuthenticationManager that can perform LDAP authentication using
password comparison.- Since:
- 5.7
-
Constructor Summary
ConstructorsConstructorDescriptionLdapPasswordComparisonAuthenticationManagerFactory(org.springframework.ldap.core.support.BaseLdapPathContextSource contextSource, PasswordEncoder passwordEncoder) -
Method Summary
Modifier and TypeMethodDescriptionprotected PasswordComparisonAuthenticatorAllows subclasses to supply the defaultAbstractLdapAuthenticator.voidsetPasswordAttribute(String passwordAttribute) The attribute in the directory which contains the user password.voidsetPasswordEncoder(PasswordEncoder passwordEncoder) Specifies thePasswordEncoderto be used when authenticating with password comparison.Methods inherited from class org.springframework.security.config.ldap.AbstractLdapAuthenticationManagerFactory
createAuthenticationManager, getContextSource, setAuthoritiesMapper, setContextSource, setLdapAuthoritiesPopulator, setUserDetailsContextMapper, setUserDnPatterns, setUserSearchBase, setUserSearchFilter
-
Constructor Details
-
LdapPasswordComparisonAuthenticationManagerFactory
public LdapPasswordComparisonAuthenticationManagerFactory(org.springframework.ldap.core.support.BaseLdapPathContextSource contextSource, PasswordEncoder passwordEncoder)
-
-
Method Details
-
setPasswordEncoder
Specifies thePasswordEncoderto be used when authenticating with password comparison.- Parameters:
passwordEncoder- thePasswordEncoderto use
-
setPasswordAttribute
The attribute in the directory which contains the user password. Only used when authenticating with password comparison. Defaults to "userPassword".- Parameters:
passwordAttribute- the attribute in the directory which contains the user password
-
createDefaultLdapAuthenticator
Description copied from class:AbstractLdapAuthenticationManagerFactoryAllows subclasses to supply the defaultAbstractLdapAuthenticator.- Specified by:
createDefaultLdapAuthenticatorin classAbstractLdapAuthenticationManagerFactory<PasswordComparisonAuthenticator>- Returns:
- the
AbstractLdapAuthenticatorthat will be configured for LDAP authentication
-