public class RedisTokenStore extends Object implements TokenStore
| Constructor and Description |
|---|
RedisTokenStore(org.springframework.data.redis.connection.RedisConnectionFactory connectionFactory) |
public RedisTokenStore(org.springframework.data.redis.connection.RedisConnectionFactory connectionFactory)
public void setAuthenticationKeyGenerator(AuthenticationKeyGenerator authenticationKeyGenerator)
public void setSerializationStrategy(RedisTokenStoreSerializationStrategy serializationStrategy)
public void setPrefix(String prefix)
public OAuth2AccessToken getAccessToken(OAuth2Authentication authentication)
TokenStoregetAccessToken in interface TokenStoreauthentication - the authentication key for the access tokenpublic OAuth2Authentication readAuthentication(OAuth2AccessToken token)
TokenStorereadAuthentication in interface TokenStoretoken - The token value under which the authentication is stored.public OAuth2Authentication readAuthentication(String token)
TokenStorereadAuthentication in interface TokenStoretoken - The token value under which the authentication is stored.public OAuth2Authentication readAuthenticationForRefreshToken(OAuth2RefreshToken token)
readAuthenticationForRefreshToken in interface TokenStoretoken - a refresh tokenpublic OAuth2Authentication readAuthenticationForRefreshToken(String token)
public void storeAccessToken(OAuth2AccessToken token, OAuth2Authentication authentication)
TokenStorestoreAccessToken in interface TokenStoretoken - The token to store.authentication - The authentication associated with the token.public void removeAccessToken(OAuth2AccessToken accessToken)
TokenStoreremoveAccessToken in interface TokenStoreaccessToken - The token to remove from the store.public OAuth2AccessToken readAccessToken(String tokenValue)
TokenStorereadAccessToken in interface TokenStoretokenValue - The token value.public void removeAccessToken(String tokenValue)
public void storeRefreshToken(OAuth2RefreshToken refreshToken, OAuth2Authentication authentication)
TokenStorestoreRefreshToken in interface TokenStorerefreshToken - The refresh token to store.authentication - The authentication associated with the refresh token.public OAuth2RefreshToken readRefreshToken(String tokenValue)
TokenStorereadRefreshToken in interface TokenStoretokenValue - The value of the token to read.public void removeRefreshToken(OAuth2RefreshToken refreshToken)
TokenStoreremoveRefreshToken in interface TokenStorerefreshToken - The token to remove from the store.public void removeRefreshToken(String tokenValue)
public void removeAccessTokenUsingRefreshToken(OAuth2RefreshToken refreshToken)
TokenStoreremoveAccessTokenUsingRefreshToken in interface TokenStorerefreshToken - The refresh token.public Collection<OAuth2AccessToken> findTokensByClientIdAndUserName(String clientId, String userName)
findTokensByClientIdAndUserName in interface TokenStoreclientId - the client id to searchuserName - the user name to searchpublic Collection<OAuth2AccessToken> findTokensByClientId(String clientId)
findTokensByClientId in interface TokenStoreclientId - the client id to searchCopyright © 2019. All rights reserved.