Class ServerHttpSecurity.HttpBasicSpec
- java.lang.Object
-
- org.springframework.security.config.web.server.ServerHttpSecurity.HttpBasicSpec
-
- Enclosing class:
- ServerHttpSecurity
public final class ServerHttpSecurity.HttpBasicSpec extends java.lang.Object
Configures HTTP Basic Authentication- Since:
- 5.0
- See Also:
ServerHttpSecurity.httpBasic()
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ServerHttpSecurity
and()
Allows method chaining to continue configuring theServerHttpSecurity
ServerHttpSecurity.HttpBasicSpec
authenticationEntryPoint(ServerAuthenticationEntryPoint authenticationEntryPoint)
Allows easily setting the entry point.ServerHttpSecurity.HttpBasicSpec
authenticationFailureHandler(ServerAuthenticationFailureHandler authenticationFailureHandler)
ServerHttpSecurity.HttpBasicSpec
authenticationManager(ReactiveAuthenticationManager authenticationManager)
TheReactiveAuthenticationManager
used to authenticate.protected void
configure(ServerHttpSecurity http)
ServerHttpSecurity
disable()
Disables HTTP Basic authentication.ServerHttpSecurity.HttpBasicSpec
securityContextRepository(ServerSecurityContextRepository securityContextRepository)
TheServerSecurityContextRepository
used to save theAuthentication
.
-
-
-
Method Detail
-
authenticationManager
public ServerHttpSecurity.HttpBasicSpec authenticationManager(ReactiveAuthenticationManager authenticationManager)
TheReactiveAuthenticationManager
used to authenticate. Defaults toServerHttpSecurity.authenticationManager(ReactiveAuthenticationManager)
.- Parameters:
authenticationManager
- the authentication manager to use- Returns:
- the
ServerHttpSecurity.HttpBasicSpec
to continue configuring
-
securityContextRepository
public ServerHttpSecurity.HttpBasicSpec securityContextRepository(ServerSecurityContextRepository securityContextRepository)
TheServerSecurityContextRepository
used to save theAuthentication
. Defaults toNoOpServerSecurityContextRepository
. For theSecurityContext
to be loaded on subsequent requests theReactorContextWebFilter
must be configured to be able to load the value (they are not implicitly linked).- Parameters:
securityContextRepository
- the repository to use- Returns:
- the
ServerHttpSecurity.HttpBasicSpec
to continue configuring
-
authenticationEntryPoint
public ServerHttpSecurity.HttpBasicSpec authenticationEntryPoint(ServerAuthenticationEntryPoint authenticationEntryPoint)
Allows easily setting the entry point.- Parameters:
authenticationEntryPoint
- theServerAuthenticationEntryPoint
to use- Returns:
ServerHttpSecurity.HttpBasicSpec
for additional customization- Since:
- 5.2.0
-
authenticationFailureHandler
public ServerHttpSecurity.HttpBasicSpec authenticationFailureHandler(ServerAuthenticationFailureHandler authenticationFailureHandler)
-
and
public ServerHttpSecurity and()
Allows method chaining to continue configuring theServerHttpSecurity
- Returns:
- the
ServerHttpSecurity
to continue configuring
-
disable
public ServerHttpSecurity disable()
Disables HTTP Basic authentication.- Returns:
- the
ServerHttpSecurity
to continue configuring
-
configure
protected void configure(ServerHttpSecurity http)
-
-