@Service @Transactional(readOnly=false) public class OAuthServiceImpl extends Object implements OAuthClientDetailsService, OAuthTokenStoreService
| Constructor and Description |
|---|
OAuthServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
protected org.springframework.security.oauth2.common.OAuth2AccessToken |
deserializeAccessToken(byte[] token) |
protected org.springframework.security.oauth2.provider.OAuth2Authentication |
deserializeAuthentication(byte[] authentication) |
protected org.springframework.security.oauth2.common.OAuth2RefreshToken |
deserializeRefreshToken(byte[] token) |
protected String |
extractTokenKey(String value) |
Collection<org.springframework.security.oauth2.common.OAuth2AccessToken> |
findTokensByClientId(String clientId) |
Collection<org.springframework.security.oauth2.common.OAuth2AccessToken> |
findTokensByClientIdAndUserName(String clientId,
String username) |
org.springframework.security.oauth2.common.OAuth2AccessToken |
getAccessToken(org.springframework.security.oauth2.provider.OAuth2Authentication authentication) |
org.springframework.security.oauth2.provider.ClientDetails |
loadClientByClientId(String clientId) |
org.springframework.security.oauth2.common.OAuth2AccessToken |
readAccessToken(String tokenValue) |
org.springframework.security.oauth2.provider.OAuth2Authentication |
readAuthentication(org.springframework.security.oauth2.common.OAuth2AccessToken token) |
org.springframework.security.oauth2.provider.OAuth2Authentication |
readAuthentication(String tokenValue) |
org.springframework.security.oauth2.provider.OAuth2Authentication |
readAuthenticationForRefreshToken(org.springframework.security.oauth2.common.OAuth2RefreshToken token) |
org.springframework.security.oauth2.provider.OAuth2Authentication |
readAuthenticationForRefreshToken(String token) |
org.springframework.security.oauth2.common.OAuth2RefreshToken |
readRefreshToken(String token) |
void |
removeAccessToken(org.springframework.security.oauth2.common.OAuth2AccessToken token) |
void |
removeAccessToken(String tokenValue) |
void |
removeAccessTokenUsingRefreshToken(org.springframework.security.oauth2.common.OAuth2RefreshToken refreshToken) |
void |
removeAccessTokenUsingRefreshToken(String refreshToken) |
void |
removeRefreshToken(org.springframework.security.oauth2.common.OAuth2RefreshToken token) |
void |
removeRefreshToken(String token) |
protected byte[] |
serializeAccessToken(org.springframework.security.oauth2.common.OAuth2AccessToken token) |
protected byte[] |
serializeAuthentication(org.springframework.security.oauth2.provider.OAuth2Authentication authentication) |
protected byte[] |
serializeRefreshToken(org.springframework.security.oauth2.common.OAuth2RefreshToken token) |
void |
setAuthenticationKeyGenerator(org.springframework.security.oauth2.provider.token.AuthenticationKeyGenerator authenticationKeyGenerator) |
void |
storeAccessToken(org.springframework.security.oauth2.common.OAuth2AccessToken token,
org.springframework.security.oauth2.provider.OAuth2Authentication authentication) |
void |
storeRefreshToken(org.springframework.security.oauth2.common.OAuth2RefreshToken refreshToken,
org.springframework.security.oauth2.provider.OAuth2Authentication authentication) |
public void setAuthenticationKeyGenerator(org.springframework.security.oauth2.provider.token.AuthenticationKeyGenerator authenticationKeyGenerator)
@Cacheable(cacheNames="oauthclient",
key="#clientId",
unless="#result == null")
public org.springframework.security.oauth2.provider.ClientDetails loadClientByClientId(String clientId)
throws org.springframework.security.oauth2.provider.ClientRegistrationException
loadClientByClientId in interface org.springframework.security.oauth2.provider.ClientDetailsServiceorg.springframework.security.oauth2.provider.ClientRegistrationException@CacheEvict(cacheNames={"oauthaccesstoken","oauthaccesstokenauth"},
allEntries=true)
public void storeAccessToken(org.springframework.security.oauth2.common.OAuth2AccessToken token,
org.springframework.security.oauth2.provider.OAuth2Authentication authentication)
storeAccessToken in interface org.springframework.security.oauth2.provider.token.TokenStore@Cacheable(cacheNames="oauthaccesstoken",
key="#tokenValue",
unless="#result == null")
public org.springframework.security.oauth2.common.OAuth2AccessToken readAccessToken(String tokenValue)
readAccessToken in interface org.springframework.security.oauth2.provider.token.TokenStore@CacheEvict(cacheNames={"oauthaccesstoken","oauthaccesstokenauth"},
allEntries=true)
public void removeAccessToken(org.springframework.security.oauth2.common.OAuth2AccessToken token)
removeAccessToken in interface org.springframework.security.oauth2.provider.token.TokenStore@CacheEvict(cacheNames={"oauthaccesstoken","oauthaccesstokenauth"},
allEntries=true)
public void removeAccessToken(String tokenValue)
@Cacheable(cacheNames="oauthaccesstokenauth",
key="#token.value",
unless="#result == null")
public org.springframework.security.oauth2.provider.OAuth2Authentication readAuthentication(org.springframework.security.oauth2.common.OAuth2AccessToken token)
readAuthentication in interface org.springframework.security.oauth2.provider.token.TokenStore@Cacheable(cacheNames="oauthaccesstokenauth",
key="#tokenValue",
unless="#result == null")
public org.springframework.security.oauth2.provider.OAuth2Authentication readAuthentication(String tokenValue)
readAuthentication in interface org.springframework.security.oauth2.provider.token.TokenStore@CacheEvict(cacheNames={"oauthaccesstoken","oauthaccesstokenauth"},
allEntries=true)
public void storeRefreshToken(org.springframework.security.oauth2.common.OAuth2RefreshToken refreshToken,
org.springframework.security.oauth2.provider.OAuth2Authentication authentication)
storeRefreshToken in interface org.springframework.security.oauth2.provider.token.TokenStorepublic org.springframework.security.oauth2.common.OAuth2RefreshToken readRefreshToken(String token)
readRefreshToken in interface org.springframework.security.oauth2.provider.token.TokenStore@CacheEvict(cacheNames={"oauthaccesstoken","oauthaccesstokenauth"},
allEntries=true)
public void removeRefreshToken(org.springframework.security.oauth2.common.OAuth2RefreshToken token)
removeRefreshToken in interface org.springframework.security.oauth2.provider.token.TokenStore@CacheEvict(cacheNames={"oauthaccesstoken","oauthaccesstokenauth"},
allEntries=true)
public void removeRefreshToken(String token)
public org.springframework.security.oauth2.provider.OAuth2Authentication readAuthenticationForRefreshToken(org.springframework.security.oauth2.common.OAuth2RefreshToken token)
readAuthenticationForRefreshToken in interface org.springframework.security.oauth2.provider.token.TokenStorepublic org.springframework.security.oauth2.provider.OAuth2Authentication readAuthenticationForRefreshToken(String token)
@CacheEvict(cacheNames={"oauthaccesstoken","oauthaccesstokenauth"},
allEntries=true)
public void removeAccessTokenUsingRefreshToken(org.springframework.security.oauth2.common.OAuth2RefreshToken refreshToken)
removeAccessTokenUsingRefreshToken in interface org.springframework.security.oauth2.provider.token.TokenStore@CacheEvict(cacheNames={"oauthaccesstoken","oauthaccesstokenauth"},
allEntries=true)
public void removeAccessTokenUsingRefreshToken(String refreshToken)
public org.springframework.security.oauth2.common.OAuth2AccessToken getAccessToken(org.springframework.security.oauth2.provider.OAuth2Authentication authentication)
getAccessToken in interface org.springframework.security.oauth2.provider.token.TokenStorepublic Collection<org.springframework.security.oauth2.common.OAuth2AccessToken> findTokensByClientIdAndUserName(String clientId, String username)
findTokensByClientIdAndUserName in interface org.springframework.security.oauth2.provider.token.TokenStorepublic Collection<org.springframework.security.oauth2.common.OAuth2AccessToken> findTokensByClientId(String clientId)
findTokensByClientId in interface org.springframework.security.oauth2.provider.token.TokenStoreprotected byte[] serializeAccessToken(org.springframework.security.oauth2.common.OAuth2AccessToken token)
protected byte[] serializeRefreshToken(org.springframework.security.oauth2.common.OAuth2RefreshToken token)
protected byte[] serializeAuthentication(org.springframework.security.oauth2.provider.OAuth2Authentication authentication)
protected org.springframework.security.oauth2.common.OAuth2AccessToken deserializeAccessToken(byte[] token)
protected org.springframework.security.oauth2.common.OAuth2RefreshToken deserializeRefreshToken(byte[] token)
protected org.springframework.security.oauth2.provider.OAuth2Authentication deserializeAuthentication(byte[] authentication)
Copyright © 2017 Global Crop Diversity Trust. All rights reserved.