Class DaoAuthenticationConfigurer<B extends ProviderManagerBuilder<B>,U extends UserDetailsService>
- java.lang.Object
-
- org.springframework.security.config.annotation.SecurityConfigurerAdapter<AuthenticationManager,B>
-
- org.springframework.security.config.annotation.authentication.configurers.userdetails.UserDetailsAwareConfigurer<B,U>
-
- org.springframework.security.config.annotation.authentication.configurers.userdetails.DaoAuthenticationConfigurer<B,U>
-
- Type Parameters:
B
- The type ofProviderManagerBuilder
this isU
- The type ofUserDetailsService
that is being used
- All Implemented Interfaces:
SecurityConfigurer<AuthenticationManager,B>
public class DaoAuthenticationConfigurer<B extends ProviderManagerBuilder<B>,U extends UserDetailsService> extends UserDetailsAwareConfigurer<B,U>
Allows configuring aDaoAuthenticationProvider
- Since:
- 3.2
-
-
Constructor Summary
Constructors Constructor Description DaoAuthenticationConfigurer(U userDetailsService)
Creates a new instance
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
configure(B builder)
Configure theSecurityBuilder
by setting the necessary properties on theSecurityBuilder
.U
getUserDetailsService()
Gets theUserDetailsService
that is used with theDaoAuthenticationProvider
C
passwordEncoder(PasswordEncoder passwordEncoder)
Allows specifying thePasswordEncoder
to use with theDaoAuthenticationProvider
.C
userDetailsPasswordManager(UserDetailsPasswordService passwordManager)
C
withObjectPostProcessor(ObjectPostProcessor<?> objectPostProcessor)
Adds anObjectPostProcessor
for this class.-
Methods inherited from class org.springframework.security.config.annotation.SecurityConfigurerAdapter
addObjectPostProcessor, and, getBuilder, init, postProcess, setBuilder
-
-
-
-
Constructor Detail
-
DaoAuthenticationConfigurer
public DaoAuthenticationConfigurer(U userDetailsService)
Creates a new instance- Parameters:
userDetailsService
-
-
-
Method Detail
-
withObjectPostProcessor
public C withObjectPostProcessor(ObjectPostProcessor<?> objectPostProcessor)
Adds anObjectPostProcessor
for this class.- Parameters:
objectPostProcessor
-- Returns:
- the
AbstractDaoAuthenticationConfigurer
for further customizations
-
passwordEncoder
public C passwordEncoder(PasswordEncoder passwordEncoder)
Allows specifying thePasswordEncoder
to use with theDaoAuthenticationProvider
. The default is to use plain text.- Parameters:
passwordEncoder
- ThePasswordEncoder
to use.- Returns:
- the
AbstractDaoAuthenticationConfigurer
for further customizations
-
userDetailsPasswordManager
public C userDetailsPasswordManager(UserDetailsPasswordService passwordManager)
-
configure
public void configure(B builder) throws java.lang.Exception
Description copied from interface:SecurityConfigurer
Configure theSecurityBuilder
by setting the necessary properties on theSecurityBuilder
.- Specified by:
configure
in interfaceSecurityConfigurer<B extends ProviderManagerBuilder<B>,C extends org.springframework.security.config.annotation.authentication.configurers.userdetails.AbstractDaoAuthenticationConfigurer<B,C,U>>
- Overrides:
configure
in classSecurityConfigurerAdapter<AuthenticationManager,B extends ProviderManagerBuilder<B>>
- Throws:
java.lang.Exception
-
getUserDetailsService
public U getUserDetailsService()
Gets theUserDetailsService
that is used with theDaoAuthenticationProvider
- Specified by:
getUserDetailsService
in classUserDetailsAwareConfigurer<B extends ProviderManagerBuilder<B>,U extends UserDetailsService>
- Returns:
- the
UserDetailsService
that is used with theDaoAuthenticationProvider
-
-