B
- the type of the ProviderManagerBuilder
C
- the UserDetailsServiceConfigurer
(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 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(PasswordEncoder passwordEncoder)
Allows specifying the
PasswordEncoder to use with the
DaoAuthenticationProvider . |
C |
passwordEncoder(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, setBuilder
public UserDetailsServiceConfigurer(U userDetailsService)
userDetailsService
- the UserDetailsService
that should be usedpublic void configure(B builder) throws Exception
SecurityConfigurer
SecurityBuilder
by setting the necessary properties on the
SecurityBuilder
.configure
in interface SecurityConfigurer<AuthenticationManager,B extends ProviderManagerBuilder<B>>
Exception
protected void initUserDetailsService() throws Exception
UserDetailsService
. For example, it
might add users, initialize schema, etc.Exception
public C withObjectPostProcessor(ObjectPostProcessor<?> objectPostProcessor)
ObjectPostProcessor
for this class.objectPostProcessor
- AbstractDaoAuthenticationConfigurer
for further customizationspublic C passwordEncoder(PasswordEncoder passwordEncoder)
PasswordEncoder
to use with the
DaoAuthenticationProvider
. The default is to use plain text.passwordEncoder
- The PasswordEncoder
to use.public C passwordEncoder(PasswordEncoder passwordEncoder)
PasswordEncoder
to use
with the DaoAuthenticationProvider
. The default is to use plain text.passwordEncoder
- The
PasswordEncoder
to
use.SecurityConfigurer
for further customizationspublic U getUserDetailsService()
UserDetailsService
that is used with the
DaoAuthenticationProvider
getUserDetailsService
in class UserDetailsAwareConfigurer<B extends ProviderManagerBuilder<B>,U extends UserDetailsService>
UserDetailsService
that is used with the
DaoAuthenticationProvider