Class AudienceRolesOpaqueTokenIntrospector
java.lang.Object
com.irurueta.authserver.resourceserver.api.web.security.AudienceRolesOpaqueTokenIntrospector
- All Implemented Interfaces:
org.springframework.security.oauth2.server.resource.introspection.OpaqueTokenIntrospector
public class AudienceRolesOpaqueTokenIntrospector
extends Object
implements org.springframework.security.oauth2.server.resource.introspection.OpaqueTokenIntrospector
Decorates an introspector of the opaque-token variant: rejects tokens whose audience is not accepted and adds the
role authorities of the
roles attribute, so the opaque variant behaves like the JWT one.-
Field Summary
FieldsModifier and TypeFieldDescriptionAudiences this resource server accepts.private final org.springframework.security.oauth2.server.resource.introspection.OpaqueTokenIntrospectorIntrospector that calls the authorization server. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.security.oauth2.core.OAuth2AuthenticatedPrincipalintrospect(String token)
-
Field Details
-
delegate
private final org.springframework.security.oauth2.server.resource.introspection.OpaqueTokenIntrospector delegateIntrospector that calls the authorization server. -
acceptedAudiences
Audiences this resource server accepts.
-
-
Constructor Details
-
AudienceRolesOpaqueTokenIntrospector
public AudienceRolesOpaqueTokenIntrospector()
-
-
Method Details
-
introspect
public org.springframework.security.oauth2.core.OAuth2AuthenticatedPrincipal introspect(String token) - Specified by:
introspectin interfaceorg.springframework.security.oauth2.server.resource.introspection.OpaqueTokenIntrospector
-