Class ServerBearerTokenAuthenticationConverter
- java.lang.Object
-
- org.springframework.security.oauth2.server.resource.web.server.ServerBearerTokenAuthenticationConverter
-
- All Implemented Interfaces:
ServerAuthenticationConverter
public class ServerBearerTokenAuthenticationConverter extends java.lang.Object implements ServerAuthenticationConverter
A strategy for resolving Bearer Tokens from theServerWebExchange
.- Since:
- 5.1
- See Also:
- RFC 6750 Section 2: Authenticated Requests
-
-
Constructor Summary
Constructors Constructor Description ServerBearerTokenAuthenticationConverter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description reactor.core.publisher.Mono<Authentication>
convert(org.springframework.web.server.ServerWebExchange exchange)
Converts aServerWebExchange
to anAuthentication
void
setAllowUriQueryParameter(boolean allowUriQueryParameter)
Set if transport of access token using URI query parameter is supported.
-
-
-
Method Detail
-
convert
public reactor.core.publisher.Mono<Authentication> convert(org.springframework.web.server.ServerWebExchange exchange)
Description copied from interface:ServerAuthenticationConverter
Converts aServerWebExchange
to anAuthentication
- Specified by:
convert
in interfaceServerAuthenticationConverter
- Parameters:
exchange
- TheServerWebExchange
- Returns:
- A
Mono
representing anAuthentication
-
setAllowUriQueryParameter
public void setAllowUriQueryParameter(boolean allowUriQueryParameter)
Set if transport of access token using URI query parameter is supported. Defaults tofalse
. 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.- Parameters:
allowUriQueryParameter
- if the URI query parameter is supported
-
-