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 Details

    • delegate

      private final org.springframework.security.oauth2.server.resource.introspection.OpaqueTokenIntrospector delegate
      Introspector that calls the authorization server.
    • acceptedAudiences

      private final List<String> 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:
      introspect in interface org.springframework.security.oauth2.server.resource.introspection.OpaqueTokenIntrospector