|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.security.config.annotation.AbstractSecurityBuilder<O> org.springframework.security.config.annotation.AbstractConfiguredSecurityBuilder<AuthenticationManager,AuthenticationManagerBuilder> org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder
public class AuthenticationManagerBuilder
SecurityBuilder
used to create an AuthenticationManager
.
Allows for easily building in memory authentication, LDAP authentication,
JDBC based authentication, adding UserDetailsService
, and adding
AuthenticationProvider
's.
Constructor Summary | |
---|---|
AuthenticationManagerBuilder(ObjectPostProcessor<Object> objectPostProcessor)
Creates a new instance |
Methods inherited from class org.springframework.security.config.annotation.AbstractConfiguredSecurityBuilder |
---|
apply, apply, beforeConfigure, beforeInit, doBuild, getConfigurer, getConfigurers, getOrBuild, getSharedObject, getSharedObjects, objectPostProcessor, postProcess, removeConfigurer, removeConfigurers, setSharedObject |
Methods inherited from class org.springframework.security.config.annotation.AbstractSecurityBuilder |
---|
build, getObject |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.springframework.security.config.annotation.SecurityBuilder |
---|
build |
Constructor Detail |
---|
public AuthenticationManagerBuilder(ObjectPostProcessor<Object> objectPostProcessor)
the
- ObjectPostProcessor
instance to use.Method Detail |
---|
public AuthenticationManagerBuilder parentAuthenticationManager(AuthenticationManager authenticationManager)
AuthenticationManager
that will be
tried if this AuthenticationManager
was unable to attempt to
authenticate the provided Authentication
.
authenticationManager
- the AuthenticationManager
that should be used if the
current AuthenticationManager
was unable to attempt to
authenticate the provided Authentication
.
AuthenticationManagerBuilder
for further adding types
of authenticationpublic AuthenticationManagerBuilder authenticationEventPublisher(AuthenticationEventPublisher eventPublisher)
AuthenticationEventPublisher
eventPublisher
- the AuthenticationEventPublisher
to use
AuthenticationManagerBuilder
for further
customizationspublic AuthenticationManagerBuilder eraseCredentials(boolean eraseCredentials)
eraseCredentials
- true if AuthenticationManager
should clear the
credentials from the Authentication
object after
authenticating
AuthenticationManagerBuilder
for further customizationspublic InMemoryUserDetailsManagerConfigurer<AuthenticationManagerBuilder> inMemoryAuthentication() throws Exception
AuthenticationManagerBuilder
and return a InMemoryUserDetailsManagerConfigurer
to
allow customization of the in memory authentication.
This method also ensure that a UserDetailsService
is available
for the getDefaultUserDetailsService()
method. Note that
additional UserDetailsService
's may override this
UserDetailsService
as the default.
InMemoryUserDetailsManagerConfigurer
to allow
customization of the in memory authentication
Exception
- if an error occurs when adding the in memory authenticationpublic JdbcUserDetailsManagerConfigurer<AuthenticationManagerBuilder> jdbcAuthentication() throws Exception
AuthenticationManagerBuilder
and
return a JdbcUserDetailsManagerConfigurer
to allow customization of the
JDBC authentication.
This method also ensure that a UserDetailsService
is available
for the getDefaultUserDetailsService()
method. Note that
additional UserDetailsService
's may override this
UserDetailsService
as the default.
JdbcUserDetailsManagerConfigurer
to allow customization of the
JDBC authentication
Exception
- if an error occurs when adding the JDBC authenticationpublic <T extends UserDetailsService> DaoAuthenticationConfigurer<AuthenticationManagerBuilder,T> userDetailsService(T userDetailsService) throws Exception
UserDetailsService
that
is passed in. It then returns a DaoAuthenticationConfigurer
to
allow customization of the authentication.
This method also ensure that the UserDetailsService
is available
for the getDefaultUserDetailsService()
method. Note that
additional UserDetailsService
's may override this
UserDetailsService
as the default.
DaoAuthenticationConfigurer
to allow customization
of the DAO authentication
Exception
- if an error occurs when adding the UserDetailsService
based authenticationpublic LdapAuthenticationProviderConfigurer<AuthenticationManagerBuilder> ldapAuthentication() throws Exception
AuthenticationManagerBuilder
and
return a LdapAuthenticationProviderConfigurer
to allow
customization of the LDAP authentication.
This method does NOT ensure that a UserDetailsService
is
available for the getDefaultUserDetailsService()
method.
LdapAuthenticationProviderConfigurer
to allow
customization of the LDAP authentication
Exception
- if an error occurs when adding the LDAP authenticationpublic AuthenticationManagerBuilder authenticationProvider(AuthenticationProvider authenticationProvider)
AuthenticationProvider
that is passed in. Since the AuthenticationProvider
implementation is unknown, all customizations must be done externally and
the AuthenticationManagerBuilder
is returned immediately.
This method does NOT ensure that the UserDetailsService
is
available for the getDefaultUserDetailsService()
method.
authenticationProvider
in interface ProviderManagerBuilder<AuthenticationManagerBuilder>
AuthenticationManagerBuilder
to allow further authentication
to be provided to the AuthenticationManagerBuilder
Exception
- if an error occurs when adding the AuthenticationProvider
protected ProviderManager performBuild() throws Exception
AbstractConfiguredSecurityBuilder
performBuild
in class AbstractConfiguredSecurityBuilder<AuthenticationManager,AuthenticationManagerBuilder>
Exception
public UserDetailsService getDefaultUserDetailsService()
UserDetailsService
for the
AuthenticationManagerBuilder
. The result may be null in some
circumstances.
UserDetailsService
for the
AuthenticationManagerBuilder
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |