类 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 aOpaqueTokenAuthenticationProviderwith the provided parametersHerodotusOpaqueTokenIntrospector(String introspectionUri, org.springframework.web.client.RestOperations restOperations) Creates aOpaqueTokenAuthenticationProviderwith the provided parameters -
方法概要
修饰符和类型方法说明org.springframework.security.oauth2.core.OAuth2AuthenticatedPrincipalintrospect(String token) voidsetRequestEntityConverter(org.springframework.core.convert.converter.Converter<String, org.springframework.http.RequestEntity<?>> requestEntityConverter) Sets theConverterused for converting the OAuth 2.0 access token to aRequestEntityrepresentation of the OAuth 2.0 token introspection request.
-
构造器详细资料
-
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 aOpaqueTokenAuthenticationProviderwith the provided parameters- 参数:
introspectionUri- The introspection endpoint uriclientId- The client id authorized to introspectclientSecret- The client's secret
-
HerodotusOpaqueTokenIntrospector
public HerodotusOpaqueTokenIntrospector(String introspectionUri, org.springframework.web.client.RestOperations restOperations) Creates aOpaqueTokenAuthenticationProviderwith the provided parametersThe given
RestOperationsshould perform its own client authentication against the introspection endpoint.- 参数:
introspectionUri- The introspection endpoint urirestOperations- 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 theConverterused for converting the OAuth 2.0 access token to aRequestEntityrepresentation of the OAuth 2.0 token introspection request.- 参数:
requestEntityConverter- theConverterused for converting to aRequestEntityrepresentation of the token introspection request
-