public final class ServerHttpSecurity.AnonymousSpec
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
ServerHttpSecurity |
and()
Allows method chaining to continue configuring the
ServerHttpSecurity |
ServerHttpSecurity.AnonymousSpec |
authenticationFilter(AnonymousAuthenticationWebFilter authenticationFilter)
Sets the
AnonymousAuthenticationWebFilter used to populate an anonymous
user. |
ServerHttpSecurity.AnonymousSpec |
authorities(java.util.List<GrantedAuthority> authorities)
Sets the
Authentication.getAuthorities() for
anonymous users |
ServerHttpSecurity.AnonymousSpec |
authorities(java.lang.String... authorities)
Sets the
Authentication.getAuthorities() for
anonymous users |
protected void |
configure(ServerHttpSecurity http) |
ServerHttpSecurity |
disable()
Disables anonymous authentication.
|
ServerHttpSecurity.AnonymousSpec |
key(java.lang.String key)
Sets the key to identify tokens created for anonymous authentication.
|
ServerHttpSecurity.AnonymousSpec |
principal(java.lang.Object principal)
Sets the principal for
Authentication objects of anonymous users |
public ServerHttpSecurity.AnonymousSpec key(java.lang.String key)
key
- the key to identify tokens created for anonymous authentication.
Default is a secure randomly generated key.ServerHttpSecurity.AnonymousSpec
for further customization of anonymous
authenticationpublic ServerHttpSecurity.AnonymousSpec principal(java.lang.Object principal)
Authentication
objects of anonymous usersprincipal
- used for the Authentication
object of anonymous usersServerHttpSecurity.AnonymousSpec
for further customization of anonymous
authenticationpublic ServerHttpSecurity.AnonymousSpec authorities(java.util.List<GrantedAuthority> authorities)
Authentication.getAuthorities()
for
anonymous usersauthorities
- Sets the
Authentication.getAuthorities()
for
anonymous usersServerHttpSecurity.AnonymousSpec
for further customization of anonymous
authenticationpublic ServerHttpSecurity.AnonymousSpec authorities(java.lang.String... authorities)
Authentication.getAuthorities()
for
anonymous usersauthorities
- Sets the
Authentication.getAuthorities()
for
anonymous users (i.e. "ROLE_ANONYMOUS")ServerHttpSecurity.AnonymousSpec
for further customization of anonymous
authenticationpublic ServerHttpSecurity.AnonymousSpec authenticationFilter(AnonymousAuthenticationWebFilter authenticationFilter)
AnonymousAuthenticationWebFilter
used to populate an anonymous
user. If this is set, no attributes on the ServerHttpSecurity.AnonymousSpec
will be set on
the AnonymousAuthenticationWebFilter
.authenticationFilter
- the AnonymousAuthenticationWebFilter
used
to populate an anonymous user.ServerHttpSecurity.AnonymousSpec
for further customization of anonymous
authenticationpublic ServerHttpSecurity and()
ServerHttpSecurity
ServerHttpSecurity
to continue configuringpublic ServerHttpSecurity disable()
ServerHttpSecurity
to continue configuringprotected void configure(ServerHttpSecurity http)