public abstract class AbstractTokenStore extends java.lang.Object implements TokenStore
| Constructor and Description |
|---|
AbstractTokenStore(org.springframework.data.redis.core.StringRedisTemplate redisTemplate) |
| Modifier and Type | Method and Description |
|---|---|
java.util.Collection<OAuth2AccessToken> |
findTokensByClientId(java.lang.String clientId)
获取 clientId 的全部 Token
|
java.util.Collection<OAuth2AccessToken> |
findTokensByClientIdAndUserName(java.lang.String clientId,
java.lang.String userName)
获取 clientId 的全部 Token
|
OAuth2AccessToken |
getAccessToken(BearerTokenAuthentication authentication)
获取 OAuth2AccessToken
|
OAuth2AccessToken |
readAccessToken(java.lang.String tokenValue)
获取 AccessToken 信息
|
BearerTokenAuthentication |
readAuthentication(BearerTokenAuthenticationToken token)
通过 Token 获取身份
|
BearerTokenAuthentication |
readAuthentication(java.lang.String token)
通过 Token 获取身份
|
BearerTokenAuthentication |
readAuthenticationForRefreshToken(OAuth2RefreshToken refreshToken)
通过 RefreshToken 获取身份信息
|
OAuth2RefreshToken |
readRefreshToken(java.lang.String tokenValue)
获取 readRefreshToken 信息
|
void |
removeAccessToken(OAuth2AccessToken token)
移除 AccessToken 信息
|
void |
removeAccessTokenUsingRefreshToken(OAuth2RefreshToken refreshToken)
通过 refreshToken 移除 AccessToken
|
void |
removeRefreshToken(OAuth2RefreshToken token)
移除 refreshToken
|
void |
storeAccessToken(OAuth2AccessToken token,
Authentication authentication)
存储 Token 对应的获取身份
|
void |
storeRefreshToken(OAuth2RefreshToken refreshToken,
Authentication authentication)
存储 refreshToken 对应的获取身份
|
public AbstractTokenStore(org.springframework.data.redis.core.StringRedisTemplate redisTemplate)
public BearerTokenAuthentication readAuthentication(BearerTokenAuthenticationToken token)
TokenStorereadAuthentication in interface TokenStorepublic BearerTokenAuthentication readAuthentication(java.lang.String token)
TokenStorereadAuthentication in interface TokenStorepublic void storeAccessToken(OAuth2AccessToken token, Authentication authentication)
TokenStorestoreAccessToken in interface TokenStorepublic OAuth2AccessToken readAccessToken(java.lang.String tokenValue)
TokenStorereadAccessToken in interface TokenStorepublic void removeAccessToken(OAuth2AccessToken token)
TokenStoreremoveAccessToken in interface TokenStorepublic void storeRefreshToken(OAuth2RefreshToken refreshToken, Authentication authentication)
TokenStorestoreRefreshToken in interface TokenStorepublic java.util.Collection<OAuth2AccessToken> findTokensByClientIdAndUserName(java.lang.String clientId, java.lang.String userName)
TokenStorefindTokensByClientIdAndUserName in interface TokenStorepublic OAuth2RefreshToken readRefreshToken(java.lang.String tokenValue)
TokenStorereadRefreshToken in interface TokenStorepublic BearerTokenAuthentication readAuthenticationForRefreshToken(OAuth2RefreshToken refreshToken)
TokenStorereadAuthenticationForRefreshToken in interface TokenStorepublic void removeRefreshToken(OAuth2RefreshToken token)
TokenStoreremoveRefreshToken in interface TokenStorepublic void removeAccessTokenUsingRefreshToken(OAuth2RefreshToken refreshToken)
TokenStoreremoveAccessTokenUsingRefreshToken in interface TokenStorepublic OAuth2AccessToken getAccessToken(BearerTokenAuthentication authentication)
TokenStoregetAccessToken in interface TokenStorepublic java.util.Collection<OAuth2AccessToken> findTokensByClientId(java.lang.String clientId)
TokenStorefindTokensByClientId in interface TokenStore