public class NimbusOpaqueTokenIntrospector extends java.lang.Object implements OpaqueTokenIntrospector
OpaqueTokenIntrospector that verifies and
introspects a token using the configured
OAuth 2.0 Introspection
Endpoint.| Constructor and Description |
|---|
NimbusOpaqueTokenIntrospector(java.lang.String introspectionUri,
org.springframework.web.client.RestOperations restOperations)
Creates a
OpaqueTokenAuthenticationProvider with the provided parameters
The given RestOperations should perform its own client authentication
against the introspection endpoint. |
NimbusOpaqueTokenIntrospector(java.lang.String introspectionUri,
java.lang.String clientId,
java.lang.String clientSecret)
Creates a
OpaqueTokenAuthenticationProvider with the provided parameters |
| Modifier and Type | Method and Description |
|---|---|
org.springframework.security.oauth2.core.OAuth2AuthenticatedPrincipal |
introspect(java.lang.String token)
Introspect and verify the given token, returning its attributes.
|
void |
setRequestEntityConverter(org.springframework.core.convert.converter.Converter<java.lang.String,org.springframework.http.RequestEntity<?>> requestEntityConverter)
Sets the
Converter used for converting the OAuth 2.0 access token to a
RequestEntity representation of the OAuth 2.0 token introspection request. |
public NimbusOpaqueTokenIntrospector(java.lang.String introspectionUri,
java.lang.String clientId,
java.lang.String clientSecret)
OpaqueTokenAuthenticationProvider with the provided parametersintrospectionUri - The introspection endpoint uriclientId - The client id authorized to introspectclientSecret - The client's secretpublic NimbusOpaqueTokenIntrospector(java.lang.String introspectionUri,
org.springframework.web.client.RestOperations restOperations)
OpaqueTokenAuthenticationProvider with the provided parameters
The given RestOperations should perform its own client authentication
against the introspection endpoint.introspectionUri - The introspection endpoint urirestOperations - The client for performing the introspection requestpublic org.springframework.security.oauth2.core.OAuth2AuthenticatedPrincipal introspect(java.lang.String token)
OpaqueTokenIntrospectorMap is indicative that the token is valid.introspect in interface OpaqueTokenIntrospectortoken - the token to introspectpublic void setRequestEntityConverter(org.springframework.core.convert.converter.Converter<java.lang.String,org.springframework.http.RequestEntity<?>> requestEntityConverter)
Converter used for converting the OAuth 2.0 access token to a
RequestEntity representation of the OAuth 2.0 token introspection request.requestEntityConverter - the Converter used for converting to a
RequestEntity representation of the token introspection request