类 UserInfoTokenServices
- java.lang.Object
- org.springframework.boot.autoconfigure.security.oauth2.resource.UserInfoTokenServices
- 所有已实现的接口:
org.springframework.security.oauth2.provider.token.ResourceServerTokenServices
public class UserInfoTokenServices extends Object implements org.springframework.security.oauth2.provider.token.ResourceServerTokenServices
ResourceServerTokenServices
that uses a user info REST service.- 从以下版本开始:
- 1.3.0
字段概要
字段 修饰符和类型 字段 说明 protected org.apache.commons.logging.Log
logger
构造器概要
构造器 构造器 说明 UserInfoTokenServices(String userInfoEndpointUrl, String clientId)
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 protected Object
getPrincipal(Map<String,Object> map)
Return the principal that should be used for the token.org.springframework.security.oauth2.provider.OAuth2Authentication
loadAuthentication(String accessToken)
org.springframework.security.oauth2.common.OAuth2AccessToken
readAccessToken(String accessToken)
void
setAuthoritiesExtractor(AuthoritiesExtractor authoritiesExtractor)
void
setPrincipalExtractor(PrincipalExtractor principalExtractor)
void
setRestTemplate(org.springframework.security.oauth2.client.OAuth2RestOperations restTemplate)
void
setTokenType(String tokenType)
字段详细资料
logger
protected final org.apache.commons.logging.Log logger
构造器详细资料
UserInfoTokenServices
public UserInfoTokenServices(String userInfoEndpointUrl, String clientId)
方法详细资料
setTokenType
public void setTokenType(String tokenType)
setRestTemplate
public void setRestTemplate(org.springframework.security.oauth2.client.OAuth2RestOperations restTemplate)
setAuthoritiesExtractor
public void setAuthoritiesExtractor(AuthoritiesExtractor authoritiesExtractor)
setPrincipalExtractor
public void setPrincipalExtractor(PrincipalExtractor principalExtractor)
loadAuthentication
public org.springframework.security.oauth2.provider.OAuth2Authentication loadAuthentication(String accessToken) throws org.springframework.security.core.AuthenticationException, org.springframework.security.oauth2.common.exceptions.InvalidTokenException
- 指定者:
loadAuthentication
在接口中org.springframework.security.oauth2.provider.token.ResourceServerTokenServices
- 抛出:
org.springframework.security.core.AuthenticationException
org.springframework.security.oauth2.common.exceptions.InvalidTokenException
getPrincipal
protected Object getPrincipal(Map<String,Object> map)
Return the principal that should be used for the token. The default implementation delegates to thePrincipalExtractor
.- 参数:
map
- the source map- 返回:
- the principal or "unknown"
readAccessToken
public org.springframework.security.oauth2.common.OAuth2AccessToken readAccessToken(String accessToken)
- 指定者:
readAccessToken
在接口中org.springframework.security.oauth2.provider.token.ResourceServerTokenServices