public final class HttpBasicConfigurer<B extends HttpSecurityBuilder<B>> extends SecurityConfigurerAdapter<org.springframework.security.web.DefaultSecurityFilterChain,B>
BasicAuthenticationFilterauthenticationEntryPoint(AuthenticationEntryPoint) (default
BasicAuthenticationEntryPoint)AuthenticationManager| Constructor and Description |
|---|
HttpBasicConfigurer()
Creates a new instance
|
| Modifier and Type | Method and Description |
|---|---|
HttpBasicConfigurer<B> |
authenticationDetailsSource(org.springframework.security.authentication.AuthenticationDetailsSource<javax.servlet.http.HttpServletRequest,?> authenticationDetailsSource)
Specifies a custom
AuthenticationDetailsSource to use for basic
authentication. |
HttpBasicConfigurer<B> |
authenticationEntryPoint(org.springframework.security.web.AuthenticationEntryPoint authenticationEntryPoint)
The
AuthenticationEntryPoint to be populated 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)
Allows easily changing the realm, but leaving the remaining defaults in
place.
|
T |
withObjectPostProcessor(ObjectPostProcessor<?> objectPostProcessor) |
addObjectPostProcessor, and, getBuilder, postProcess, setBuilderpublic HttpBasicConfigurer<B> realmName(String realmName) throws Exception
authenticationEntryPoint(AuthenticationEntryPoint) has
been invoked, invoking this method will result in an error.realmName - the HTTP Basic realm to useHttpBasicConfigurer for additional customizationExceptionpublic HttpBasicConfigurer<B> authenticationEntryPoint(org.springframework.security.web.AuthenticationEntryPoint authenticationEntryPoint)
AuthenticationEntryPoint to be populated on
BasicAuthenticationFilter in the event that authentication fails.
The default to use BasicAuthenticationEntryPoint with the realm
"Spring Security Application".authenticationEntryPoint - the AuthenticationEntryPoint to useHttpBasicConfigurer for additional customizationpublic HttpBasicConfigurer<B> authenticationDetailsSource(org.springframework.security.authentication.AuthenticationDetailsSource<javax.servlet.http.HttpServletRequest,?> authenticationDetailsSource)
AuthenticationDetailsSource to use for basic
authentication. The default is WebAuthenticationDetailsSource.authenticationDetailsSource - the custom AuthenticationDetailsSource to useHttpBasicConfigurer for additional customizationpublic void init(B http) throws Exception
SecurityConfigurerSecurityBuilder. 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<org.springframework.security.web.DefaultSecurityFilterChain,B extends HttpSecurityBuilder<B>>init in class SecurityConfigurerAdapter<org.springframework.security.web.DefaultSecurityFilterChain,B extends HttpSecurityBuilder<B>>Exceptionpublic void configure(B http) throws Exception
SecurityConfigurerSecurityBuilder by setting the necessary properties
on the SecurityBuilder.configure in interface SecurityConfigurer<org.springframework.security.web.DefaultSecurityFilterChain,B extends HttpSecurityBuilder<B>>configure in class SecurityConfigurerAdapter<org.springframework.security.web.DefaultSecurityFilterChain,B extends HttpSecurityBuilder<B>>Exceptionpublic 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)