public class HerodotusOpaqueTokenIntrospector extends Object implements org.springframework.security.oauth2.server.resource.introspection.OpaqueTokenIntrospector
Description: 自定义 OpaqueTokenIntrospector
解决默认的 OpaqueTokenIntrospector 使用 Scope 作为权限的问题。
| 构造器和说明 |
|---|
HerodotusOpaqueTokenIntrospector(cn.herodotus.engine.web.core.properties.EndpointProperties endpointProperties,
org.springframework.boot.autoconfigure.security.oauth2.resource.OAuth2ResourceServerProperties resourceServerProperties) |
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. |
HerodotusOpaqueTokenIntrospector(String introspectionUri,
String clientId,
String clientSecret)
Creates a
OpaqueTokenAuthenticationProvider with the provided parameters |
| 限定符和类型 | 方法和说明 |
|---|---|
org.springframework.security.oauth2.core.OAuth2AuthenticatedPrincipal |
introspect(String token) |
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. |
public HerodotusOpaqueTokenIntrospector(cn.herodotus.engine.web.core.properties.EndpointProperties endpointProperties,
org.springframework.boot.autoconfigure.security.oauth2.resource.OAuth2ResourceServerProperties resourceServerProperties)
public HerodotusOpaqueTokenIntrospector(String introspectionUri, String clientId, String clientSecret)
OpaqueTokenAuthenticationProvider with the provided parametersintrospectionUri - The introspection endpoint uriclientId - The client id authorized to introspectclientSecret - The client's secretpublic HerodotusOpaqueTokenIntrospector(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(String token)
introspect 在接口中 org.springframework.security.oauth2.server.resource.introspection.OpaqueTokenIntrospectorpublic void setRequestEntityConverter(org.springframework.core.convert.converter.Converter<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 requestCopyright © 2023 Dromara. All rights reserved.