public static class SecurityExchangeMutators.UserExchangeMutator
extends java.lang.Object
implements java.util.function.Function<org.springframework.web.server.ServerWebExchange,org.springframework.web.server.ServerWebExchange>
SecurityExchangeMutators#withUser(UserDetails)
. Defaults to use a
password of "password" and granted authorities of "ROLE_USER".Modifier and Type | Method and Description |
---|---|
SecurityExchangeMutators.UserExchangeMutator |
accountExpired(boolean accountExpired) |
SecurityExchangeMutators.UserExchangeMutator |
accountLocked(boolean accountLocked) |
org.springframework.web.server.ServerWebExchange |
apply(org.springframework.web.server.ServerWebExchange serverWebExchange) |
SecurityExchangeMutators.UserExchangeMutator |
authorities(java.util.Collection<? extends GrantedAuthority> authorities)
Specifies the
GrantedAuthority s to use. |
SecurityExchangeMutators.UserExchangeMutator |
authorities(GrantedAuthority... authorities)
Specifies the
GrantedAuthority s to use. |
SecurityExchangeMutators.UserExchangeMutator |
authorities(java.lang.String... authorities)
Specifies the
GrantedAuthority s to use. |
SecurityExchangeMutators.UserExchangeMutator |
credentialsExpired(boolean credentialsExpired) |
SecurityExchangeMutators.UserExchangeMutator |
disabled(boolean disabled) |
SecurityExchangeMutators.UserExchangeMutator |
password(java.lang.String password)
Specifies the password to use.
|
SecurityExchangeMutators.UserExchangeMutator |
roles(java.lang.String... roles)
Specifies the roles to use.
|
public SecurityExchangeMutators.UserExchangeMutator password(java.lang.String password)
password
- the password to usepublic SecurityExchangeMutators.UserExchangeMutator roles(java.lang.String... roles)
roles
- the roles to use.public SecurityExchangeMutators.UserExchangeMutator authorities(GrantedAuthority... authorities)
GrantedAuthority
s to use. Default is "ROLE_USER".authorities
- the authorities to use.public SecurityExchangeMutators.UserExchangeMutator authorities(java.util.Collection<? extends GrantedAuthority> authorities)
GrantedAuthority
s to use. Default is "ROLE_USER".authorities
- the authorities to use.public SecurityExchangeMutators.UserExchangeMutator authorities(java.lang.String... authorities)
GrantedAuthority
s to use. Default is "ROLE_USER".authorities
- the authorities to use.public SecurityExchangeMutators.UserExchangeMutator accountExpired(boolean accountExpired)
public SecurityExchangeMutators.UserExchangeMutator accountLocked(boolean accountLocked)
public SecurityExchangeMutators.UserExchangeMutator credentialsExpired(boolean credentialsExpired)
public SecurityExchangeMutators.UserExchangeMutator disabled(boolean disabled)
public org.springframework.web.server.ServerWebExchange apply(org.springframework.web.server.ServerWebExchange serverWebExchange)
apply
in interface java.util.function.Function<org.springframework.web.server.ServerWebExchange,org.springframework.web.server.ServerWebExchange>