Class SpringReactiveOpaqueTokenIntrospector
- java.lang.Object
-
- org.springframework.security.oauth2.server.resource.introspection.SpringReactiveOpaqueTokenIntrospector
-
- All Implemented Interfaces:
ReactiveOpaqueTokenIntrospector
public class SpringReactiveOpaqueTokenIntrospector extends java.lang.Object implements ReactiveOpaqueTokenIntrospector
A Spring implementation ofReactiveOpaqueTokenIntrospectorthat verifies and introspects a token using the configured OAuth 2.0 Introspection Endpoint.- Since:
- 5.6
-
-
Constructor Summary
Constructors Constructor Description SpringReactiveOpaqueTokenIntrospector(java.lang.String introspectionUri, java.lang.String clientId, java.lang.String clientSecret)Creates aOpaqueTokenReactiveAuthenticationManagerwith the provided parametersSpringReactiveOpaqueTokenIntrospector(java.lang.String introspectionUri, org.springframework.web.reactive.function.client.WebClient webClient)Creates aOpaqueTokenReactiveAuthenticationManagerwith the provided parameters
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description reactor.core.publisher.Mono<org.springframework.security.oauth2.core.OAuth2AuthenticatedPrincipal>introspect(java.lang.String token)Introspect and verify the given token, returning its attributes.
-
-
-
Constructor Detail
-
SpringReactiveOpaqueTokenIntrospector
public SpringReactiveOpaqueTokenIntrospector(java.lang.String introspectionUri, java.lang.String clientId, java.lang.String clientSecret)Creates aOpaqueTokenReactiveAuthenticationManagerwith the provided parameters- Parameters:
introspectionUri- The introspection endpoint uriclientId- The client id authorized to introspectclientSecret- The client secret for the authorized client
-
SpringReactiveOpaqueTokenIntrospector
public SpringReactiveOpaqueTokenIntrospector(java.lang.String introspectionUri, org.springframework.web.reactive.function.client.WebClient webClient)Creates aOpaqueTokenReactiveAuthenticationManagerwith the provided parameters- Parameters:
introspectionUri- The introspection endpoint uriwebClient- The client for performing the introspection request
-
-
Method Detail
-
introspect
public reactor.core.publisher.Mono<org.springframework.security.oauth2.core.OAuth2AuthenticatedPrincipal> introspect(java.lang.String token)
Description copied from interface:ReactiveOpaqueTokenIntrospectorIntrospect and verify the given token, returning its attributes. Returning aMapis indicative that the token is valid.- Specified by:
introspectin interfaceReactiveOpaqueTokenIntrospector- Parameters:
token- the token to introspect- Returns:
- the token's attributes
-
-