Class ServerHttpSecurity.HttpBasicSpec
java.lang.Object
org.springframework.security.config.web.server.ServerHttpSecurity.HttpBasicSpec
- Enclosing class:
 - ServerHttpSecurity
 
Configures HTTP Basic Authentication
- Since:
 - 5.0
 - See Also:
 
- 
Method Summary
Modifier and TypeMethodDescriptionand()Allows method chaining to continue configuring theServerHttpSecurityauthenticationEntryPoint(ServerAuthenticationEntryPoint authenticationEntryPoint) Allows easily setting the entry point.authenticationFailureHandler(ServerAuthenticationFailureHandler authenticationFailureHandler) authenticationManager(ReactiveAuthenticationManager authenticationManager) TheReactiveAuthenticationManagerused to authenticate.protected voidconfigure(ServerHttpSecurity http) disable()Disables HTTP Basic authentication.securityContextRepository(ServerSecurityContextRepository securityContextRepository) TheServerSecurityContextRepositoryused to save theAuthentication. 
- 
Method Details
- 
authenticationManager
public ServerHttpSecurity.HttpBasicSpec authenticationManager(ReactiveAuthenticationManager authenticationManager) TheReactiveAuthenticationManagerused to authenticate. Defaults toServerHttpSecurity.authenticationManager(ReactiveAuthenticationManager).- Parameters:
 authenticationManager- the authentication manager to use- Returns:
 - the 
ServerHttpSecurity.HttpBasicSpecto continue configuring 
 - 
securityContextRepository
public ServerHttpSecurity.HttpBasicSpec securityContextRepository(ServerSecurityContextRepository securityContextRepository) TheServerSecurityContextRepositoryused to save theAuthentication. Defaults toNoOpServerSecurityContextRepository. For theSecurityContextto be loaded on subsequent requests theReactorContextWebFiltermust be configured to be able to load the value (they are not implicitly linked).- Parameters:
 securityContextRepository- the repository to use- Returns:
 - the 
ServerHttpSecurity.HttpBasicSpecto continue configuring 
 - 
authenticationEntryPoint
public ServerHttpSecurity.HttpBasicSpec authenticationEntryPoint(ServerAuthenticationEntryPoint authenticationEntryPoint) Allows easily setting the entry point.- Parameters:
 authenticationEntryPoint- theServerAuthenticationEntryPointto use- Returns:
 ServerHttpSecurity.HttpBasicSpecfor additional customization- Since:
 - 5.2.0
 
 - 
authenticationFailureHandler
public ServerHttpSecurity.HttpBasicSpec authenticationFailureHandler(ServerAuthenticationFailureHandler authenticationFailureHandler)  - 
and
Allows method chaining to continue configuring theServerHttpSecurity- Returns:
 - the 
ServerHttpSecurityto continue configuring 
 - 
disable
Disables HTTP Basic authentication.- Returns:
 - the 
ServerHttpSecurityto continue configuring 
 - 
configure
 
 -