public class UserInfoTokenServices extends Object implements org.springframework.security.oauth2.provider.token.ResourceServerTokenServices
ResourceServerTokenServices
that uses a user info REST service.Modifier and Type | Field and Description |
---|---|
protected org.apache.commons.logging.Log |
logger |
Constructor and Description |
---|
UserInfoTokenServices(String userInfoEndpointUrl,
String clientId) |
Modifier and Type | Method and Description |
---|---|
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) |
public void setTokenType(String tokenType)
public void setRestTemplate(org.springframework.security.oauth2.client.OAuth2RestOperations restTemplate)
public void setAuthoritiesExtractor(AuthoritiesExtractor authoritiesExtractor)
public void setPrincipalExtractor(PrincipalExtractor principalExtractor)
public org.springframework.security.oauth2.provider.OAuth2Authentication loadAuthentication(String accessToken) throws org.springframework.security.core.AuthenticationException, org.springframework.security.oauth2.common.exceptions.InvalidTokenException
loadAuthentication
in interface org.springframework.security.oauth2.provider.token.ResourceServerTokenServices
org.springframework.security.core.AuthenticationException
org.springframework.security.oauth2.common.exceptions.InvalidTokenException
protected Object getPrincipal(Map<String,Object> map)
PrincipalExtractor
.map
- the source mappublic org.springframework.security.oauth2.common.OAuth2AccessToken readAccessToken(String accessToken)
readAccessToken
in interface org.springframework.security.oauth2.provider.token.ResourceServerTokenServices
Copyright © 2017 Pivotal Software, Inc.. All rights reserved.