|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.security.config.annotation.SecurityConfigurerAdapter<DefaultSecurityFilterChain,B> org.springframework.security.config.annotation.web.configurers.HttpBasicConfigurer<B>
public final class HttpBasicConfigurer<B extends HttpSecurityBuilder<B>>
Adds HTTP basic based authentication. All attributes have reasonable defaults making all parameters are optional.
authenticationEntryPoint(AuthenticationEntryPoint)
(default
BasicAuthenticationEntryPoint
)
Constructor Summary | |
---|---|
HttpBasicConfigurer()
Creates a new instance |
Method Summary | |
---|---|
HttpBasicConfigurer<B> |
authenticationDetailsSource(AuthenticationDetailsSource<javax.servlet.http.HttpServletRequest,?> authenticationDetailsSource)
Specifies a custom AuthenticationDetailsSource to use for basic
authentication. |
HttpBasicConfigurer<B> |
authenticationEntryPoint(AuthenticationEntryPoint authenticationEntryPoint)
The AuthenticationEntryPoint to be po pulated on
BasicAuthenticationFilter in the event that authentication fails. |
void |
configure(B http)
Configure the SecurityBuilder by setting the necessary properties
on the SecurityBuilder . |
B |
disable()
Disables the AbstractHttpConfigurer by removing it. |
void |
init(B http)
Initialize the SecurityBuilder . |
HttpBasicConfigurer<B> |
realmName(String realmName)
Shortcut for authenticationEntryPoint(AuthenticationEntryPoint)
specifying a BasicAuthenticationEntryPoint with the specified
realm name. |
T |
withObjectPostProcessor(ObjectPostProcessor<?> objectPostProcessor)
|
Methods inherited from class org.springframework.security.config.annotation.SecurityConfigurerAdapter |
---|
addObjectPostProcessor, and, getBuilder, postProcess, setBuilder |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HttpBasicConfigurer() throws Exception
Exception
HttpSecurity#httpBasic()}
Method Detail |
---|
public HttpBasicConfigurer<B> realmName(String realmName) throws Exception
authenticationEntryPoint(AuthenticationEntryPoint)
specifying a BasicAuthenticationEntryPoint
with the specified
realm name.
realmName
- the HTTP Basic realm to use
HttpBasicConfigurer
for additional customization
Exception
public HttpBasicConfigurer<B> authenticationEntryPoint(AuthenticationEntryPoint authenticationEntryPoint)
AuthenticationEntryPoint
to be po pulated on
BasicAuthenticationFilter
in the event that authentication fails.
The default to use BasicAuthenticationEntryPoint
with the realm
"Spring Security Application".
authenticationEntryPoint
- the AuthenticationEntryPoint
to use
HttpBasicConfigurer
for additional customizationpublic HttpBasicConfigurer<B> authenticationDetailsSource(AuthenticationDetailsSource<javax.servlet.http.HttpServletRequest,?> authenticationDetailsSource)
AuthenticationDetailsSource
to use for basic
authentication. The default is WebAuthenticationDetailsSource
.
authenticationDetailsSource
- the custom AuthenticationDetailsSource
to use
HttpBasicConfigurer
for additional customizationpublic void init(B http) throws Exception
SecurityConfigurer
SecurityBuilder
. Here only shared state should be
created and modified, but not properties on the SecurityBuilder
used for building the object. This ensures that the
SecurityConfigurer.configure(SecurityBuilder)
method uses the correct shared
objects when building.
init
in interface SecurityConfigurer<DefaultSecurityFilterChain,B extends HttpSecurityBuilder<B>>
init
in class SecurityConfigurerAdapter<DefaultSecurityFilterChain,B extends HttpSecurityBuilder<B>>
Exception
public void configure(B http) throws Exception
SecurityConfigurer
SecurityBuilder
by setting the necessary properties
on the SecurityBuilder
.
configure
in interface SecurityConfigurer<DefaultSecurityFilterChain,B extends HttpSecurityBuilder<B>>
configure
in class SecurityConfigurerAdapter<DefaultSecurityFilterChain,B extends HttpSecurityBuilder<B>>
Exception
public B disable()
AbstractHttpConfigurer
by removing it. After doing
so a fresh version of the configuration can be applied.
HttpSecurityBuilder
for additional customizationspublic T withObjectPostProcessor(ObjectPostProcessor<?> objectPostProcessor)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |