类 HerodotusOpaqueTokenIntrospector

java.lang.Object
cn.herodotus.engine.oauth2.authorization.introspector.HerodotusOpaqueTokenIntrospector
所有已实现的接口:
org.springframework.security.oauth2.server.resource.introspection.OpaqueTokenIntrospector

public class HerodotusOpaqueTokenIntrospector extends Object implements org.springframework.security.oauth2.server.resource.introspection.OpaqueTokenIntrospector

Description: 自定义 OpaqueTokenIntrospector

解决默认的 OpaqueTokenIntrospector 使用 Scope 作为权限的问题。
作者:
: gengwei.zheng
Date:
: 2022/10/10 14:34
  • 构造器概要

    构造器
    构造器
    说明
    HerodotusOpaqueTokenIntrospector(cn.herodotus.engine.rest.core.properties.EndpointProperties endpointProperties, org.springframework.boot.autoconfigure.security.oauth2.resource.OAuth2ResourceServerProperties resourceServerProperties)
     
    HerodotusOpaqueTokenIntrospector(String introspectionUri, String clientId, String clientSecret)
    Creates a OpaqueTokenAuthenticationProvider with the provided parameters
    HerodotusOpaqueTokenIntrospector(String introspectionUri, org.springframework.web.client.RestOperations restOperations)
    Creates a OpaqueTokenAuthenticationProvider with the provided parameters
  • 方法概要

    修饰符和类型
    方法
    说明
    org.springframework.security.oauth2.core.OAuth2AuthenticatedPrincipal
     
    void
    setRequestEntityConverter(org.springframework.core.convert.converter.Converter<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.

    从类继承的方法 java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 构造器详细资料

    • HerodotusOpaqueTokenIntrospector

      public HerodotusOpaqueTokenIntrospector(cn.herodotus.engine.rest.core.properties.EndpointProperties endpointProperties, org.springframework.boot.autoconfigure.security.oauth2.resource.OAuth2ResourceServerProperties resourceServerProperties)
    • HerodotusOpaqueTokenIntrospector

      public HerodotusOpaqueTokenIntrospector(String introspectionUri, String clientId, String clientSecret)
      Creates a OpaqueTokenAuthenticationProvider with the provided parameters
      参数:
      introspectionUri - The introspection endpoint uri
      clientId - The client id authorized to introspect
      clientSecret - The client's secret
    • HerodotusOpaqueTokenIntrospector

      public HerodotusOpaqueTokenIntrospector(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.

      参数:
      introspectionUri - The introspection endpoint uri
      restOperations - The client for performing the introspection request
  • 方法详细资料

    • introspect

      public org.springframework.security.oauth2.core.OAuth2AuthenticatedPrincipal introspect(String token)
      指定者:
      introspect 在接口中 org.springframework.security.oauth2.server.resource.introspection.OpaqueTokenIntrospector
    • setRequestEntityConverter

      public void setRequestEntityConverter(org.springframework.core.convert.converter.Converter<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.
      参数:
      requestEntityConverter - the Converter used for converting to a RequestEntity representation of the token introspection request