Class AbstractDaoAuthenticationConfigurer<B extends ProviderManagerBuilder<B>,C extends AbstractDaoAuthenticationConfigurer<B,C,U>,U extends org.springframework.security.core.userdetails.UserDetailsService>
- java.lang.Object
-
- org.springframework.security.config.annotation.SecurityConfigurerAdapter<org.springframework.security.authentication.AuthenticationManager,B>
-
- org.springframework.security.config.annotation.authentication.configurers.userdetails.UserDetailsAwareConfigurer<B,U>
-
- org.springframework.security.config.annotation.authentication.configurers.userdetails.AbstractDaoAuthenticationConfigurer<B,C,U>
-
- Type Parameters:
B- the type of theSecurityBuilderC- the type ofAbstractDaoAuthenticationConfigurerthis isU- The type ofUserDetailsServicethat is being used
- All Implemented Interfaces:
SecurityConfigurer<org.springframework.security.authentication.AuthenticationManager,B>
- Direct Known Subclasses:
DaoAuthenticationConfigurer,UserDetailsServiceConfigurer
public abstract class AbstractDaoAuthenticationConfigurer<B extends ProviderManagerBuilder<B>,C extends AbstractDaoAuthenticationConfigurer<B,C,U>,U extends org.springframework.security.core.userdetails.UserDetailsService> extends UserDetailsAwareConfigurer<B,U>
Allows configuring aDaoAuthenticationProvider- Since:
- 3.2
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconfigure(B builder)Configure theSecurityBuilderby setting the necessary properties on theSecurityBuilder.UgetUserDetailsService()Gets theUserDetailsServicethat is used with theDaoAuthenticationProviderCpasswordEncoder(org.springframework.security.crypto.password.PasswordEncoder passwordEncoder)Allows specifying thePasswordEncoderto use with theDaoAuthenticationProvider.CuserDetailsPasswordManager(org.springframework.security.core.userdetails.UserDetailsPasswordService passwordManager)CwithObjectPostProcessor(ObjectPostProcessor<?> objectPostProcessor)Adds anObjectPostProcessorfor this class.-
Methods inherited from class org.springframework.security.config.annotation.SecurityConfigurerAdapter
addObjectPostProcessor, and, getBuilder, init, postProcess, setBuilder
-
-
-
-
Method Detail
-
withObjectPostProcessor
public C withObjectPostProcessor(ObjectPostProcessor<?> objectPostProcessor)
Adds anObjectPostProcessorfor this class.- Parameters:
objectPostProcessor-- Returns:
- the
AbstractDaoAuthenticationConfigurerfor further customizations
-
passwordEncoder
public C passwordEncoder(org.springframework.security.crypto.password.PasswordEncoder passwordEncoder)
Allows specifying thePasswordEncoderto use with theDaoAuthenticationProvider. The default is to use plain text.- Parameters:
passwordEncoder- ThePasswordEncoderto use.- Returns:
- the
AbstractDaoAuthenticationConfigurerfor further customizations
-
userDetailsPasswordManager
public C userDetailsPasswordManager(org.springframework.security.core.userdetails.UserDetailsPasswordService passwordManager)
-
configure
public void configure(B builder) throws java.lang.Exception
Description copied from interface:SecurityConfigurerConfigure theSecurityBuilderby setting the necessary properties on theSecurityBuilder.- Specified by:
configurein interfaceSecurityConfigurer<B extends ProviderManagerBuilder<B>,C extends AbstractDaoAuthenticationConfigurer<B,C,U>>- Overrides:
configurein classSecurityConfigurerAdapter<org.springframework.security.authentication.AuthenticationManager,B extends ProviderManagerBuilder<B>>- Throws:
java.lang.Exception
-
getUserDetailsService
public U getUserDetailsService()
Gets theUserDetailsServicethat is used with theDaoAuthenticationProvider- Specified by:
getUserDetailsServicein classUserDetailsAwareConfigurer<B extends ProviderManagerBuilder<B>,U extends org.springframework.security.core.userdetails.UserDetailsService>- Returns:
- the
UserDetailsServicethat is used with theDaoAuthenticationProvider
-
-