Class OpaqueTokenReactiveAuthenticationManager
- java.lang.Object
-
- org.springframework.security.oauth2.server.resource.authentication.OpaqueTokenReactiveAuthenticationManager
-
- All Implemented Interfaces:
ReactiveAuthenticationManager
public class OpaqueTokenReactiveAuthenticationManager extends java.lang.Object implements ReactiveAuthenticationManager
AnReactiveAuthenticationManagerimplementation for opaque Bearer Tokens, using an OAuth 2.0 Introspection Endpoint to check the token's validity and reveal its attributes.This
ReactiveAuthenticationManageris responsible for introspecting and verifying an opaque access token, returning its attributes set as part of theAuthenticationstatement.Scopes are translated into
GrantedAuthoritys according to the following algorithm:- If there is a "scope" attribute, then convert to a
CollectionofStrings. - Take the resulting
Collectionand prepend the "SCOPE_" keyword to each element, adding asGrantedAuthoritys.
- Since:
- 5.2
- See Also:
ReactiveAuthenticationManager
-
-
Constructor Summary
Constructors Constructor Description OpaqueTokenReactiveAuthenticationManager(ReactiveOpaqueTokenIntrospector introspector)Creates aOpaqueTokenReactiveAuthenticationManagerwith the provided parameters
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description reactor.core.publisher.Mono<Authentication>authenticate(Authentication authentication)Attempts to authenticate the providedAuthentication
-
-
-
Constructor Detail
-
OpaqueTokenReactiveAuthenticationManager
public OpaqueTokenReactiveAuthenticationManager(ReactiveOpaqueTokenIntrospector introspector)
Creates aOpaqueTokenReactiveAuthenticationManagerwith the provided parameters- Parameters:
introspector- TheReactiveOpaqueTokenIntrospectorto use
-
-
Method Detail
-
authenticate
public reactor.core.publisher.Mono<Authentication> authenticate(Authentication authentication)
Description copied from interface:ReactiveAuthenticationManagerAttempts to authenticate the providedAuthentication- Specified by:
authenticatein interfaceReactiveAuthenticationManager- Parameters:
authentication- theAuthenticationto test- Returns:
- if authentication is successful an
Authenticationis returned. If authentication cannot be determined, an empty Mono is returned. If authentication fails, a Mono error is returned.
-
-