public class ServerBearerTokenAuthenticationConverter
extends java.lang.Object
implements org.springframework.security.web.server.authentication.ServerAuthenticationConverter
ServerWebExchange.| Constructor and Description |
|---|
ServerBearerTokenAuthenticationConverter() |
| Modifier and Type | Method and Description |
|---|---|
reactor.core.publisher.Mono<org.springframework.security.core.Authentication> |
convert(org.springframework.web.server.ServerWebExchange exchange) |
void |
setAllowUriQueryParameter(boolean allowUriQueryParameter)
Set if transport of access token using URI query parameter is supported.
|
void |
setBearerTokenHeaderName(java.lang.String bearerTokenHeaderName)
Set this value to configure what header is checked when resolving a Bearer Token.
|
public ServerBearerTokenAuthenticationConverter()
public reactor.core.publisher.Mono<org.springframework.security.core.Authentication> convert(org.springframework.web.server.ServerWebExchange exchange)
convert in interface org.springframework.security.web.server.authentication.ServerAuthenticationConverterpublic void setAllowUriQueryParameter(boolean allowUriQueryParameter)
false.
The spec recommends against using this mechanism for sending bearer tokens, and
even goes as far as stating that it was only included for completeness.allowUriQueryParameter - if the URI query parameter is supportedpublic void setBearerTokenHeaderName(java.lang.String bearerTokenHeaderName)
HttpHeaders.AUTHORIZATION.
This allows other headers to be used as the Bearer Token source such as
HttpHeaders.PROXY_AUTHORIZATIONbearerTokenHeaderName - the header to check when retrieving the Bearer Token.