B - the type of the SecurityBuilderC - the SecurityConfigurer (or this)U - the type of UserDetailsService being used to allow for returning the concrete UserDetailsService.public class UserDetailsServiceConfigurer<B extends ProviderManagerBuilder<B>,C extends UserDetailsServiceConfigurer<B,C,U>,U extends org.springframework.security.core.userdetails.UserDetailsService> extends UserDetailsAwareConfigurer<B,U>
UserDetailsService within a AuthenticationManagerBuilder.| Constructor and Description |
|---|
UserDetailsServiceConfigurer(U userDetailsService)
Creates a new instance
|
| Modifier and Type | Method and Description |
|---|---|
void |
configure(B builder)
Configure the
SecurityBuilder by setting the necessary properties
on the SecurityBuilder. |
U |
getUserDetailsService()
Gets the
UserDetailsService that is used with the DaoAuthenticationProvider |
protected void |
initUserDetailsService()
Allows subclasses to initialize the
UserDetailsService. |
C |
passwordEncoder(org.springframework.security.crypto.password.PasswordEncoder passwordEncoder)
Allows specifying the
PasswordEncoder to use with the DaoAuthenticationProvider. |
C |
passwordEncoder(org.springframework.security.authentication.encoding.PasswordEncoder passwordEncoder)
Allows specifying the
PasswordEncoder
to use with the DaoAuthenticationProvider. |
C |
withObjectPostProcessor(ObjectPostProcessor<?> objectPostProcessor)
Adds an
ObjectPostProcessor for this class. |
addObjectPostProcessor, and, getBuilder, init, postProcess, setBuilderpublic UserDetailsServiceConfigurer(U userDetailsService)
userDetailsService - the UserDetailsService that should be usedpublic void configure(B builder) throws Exception
SecurityConfigurerSecurityBuilder by setting the necessary properties
on the SecurityBuilder.configure in interface SecurityConfigurer<org.springframework.security.authentication.AuthenticationManager,B extends ProviderManagerBuilder<B>>Exceptionprotected void initUserDetailsService()
throws Exception
UserDetailsService. For example, it might add users, initialize
schema, etc.Exceptionpublic C withObjectPostProcessor(ObjectPostProcessor<?> objectPostProcessor)
ObjectPostProcessor for this class.objectPostProcessor - AbstractDaoAuthenticationConfigurer for further customizationspublic C passwordEncoder(org.springframework.security.crypto.password.PasswordEncoder passwordEncoder)
PasswordEncoder to use with the DaoAuthenticationProvider. The default is
is to use plain text.passwordEncoder - The PasswordEncoder to use.public C passwordEncoder(org.springframework.security.authentication.encoding.PasswordEncoder passwordEncoder)
PasswordEncoder
to use with the DaoAuthenticationProvider. The default is is to
use plain text.passwordEncoder - The
PasswordEncoder
to use.SecurityConfigurer for further customizationspublic U getUserDetailsService()
UserDetailsService that is used with the DaoAuthenticationProvidergetUserDetailsService in class UserDetailsAwareConfigurer<B extends ProviderManagerBuilder<B>,U extends org.springframework.security.core.userdetails.UserDetailsService>UserDetailsService that is used with the DaoAuthenticationProvider