public class JdbcTokenStore extends Object implements TokenStore
| Constructor and Description |
|---|
JdbcTokenStore(DataSource dataSource) |
public JdbcTokenStore(DataSource dataSource)
public void setAuthenticationKeyGenerator(AuthenticationKeyGenerator authenticationKeyGenerator)
public OAuth2AccessToken getAccessToken(OAuth2Authentication authentication)
TokenStoregetAccessToken in interface TokenStoreauthentication - the authentication key for the access tokenpublic void storeAccessToken(OAuth2AccessToken token, OAuth2Authentication authentication)
TokenStorestoreAccessToken in interface TokenStoretoken - The token to store.authentication - The authentication associated with the token.public OAuth2AccessToken readAccessToken(String tokenValue)
TokenStorereadAccessToken in interface TokenStoretokenValue - The token value.public void removeAccessToken(OAuth2AccessToken token)
TokenStoreremoveAccessToken in interface TokenStoretoken - The token to remove from the database.public void removeAccessToken(String tokenValue)
public 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 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 token)
TokenStorereadRefreshToken in interface TokenStoretoken - The value of the token to read.public void removeRefreshToken(OAuth2RefreshToken token)
TokenStoreremoveRefreshToken in interface TokenStoretoken - The token to remove from the database.public void removeRefreshToken(String token)
public OAuth2Authentication readAuthenticationForRefreshToken(OAuth2RefreshToken token)
readAuthenticationForRefreshToken in interface TokenStoretoken - a refresh tokenpublic OAuth2Authentication readAuthenticationForRefreshToken(String value)
public void removeAccessTokenUsingRefreshToken(OAuth2RefreshToken refreshToken)
TokenStoreremoveAccessTokenUsingRefreshToken in interface TokenStorerefreshToken - The refresh token.public void removeAccessTokenUsingRefreshToken(String refreshToken)
public Collection<OAuth2AccessToken> findTokensByClientId(String clientId)
findTokensByClientId in interface TokenStoreclientId - the client id to searchpublic Collection<OAuth2AccessToken> findTokensByUserName(String userName)
public Collection<OAuth2AccessToken> findTokensByClientIdAndUserName(String clientId, String userName)
findTokensByClientIdAndUserName in interface TokenStoreclientId - the client id to searchuserName - the user name to searchprotected byte[] serializeAccessToken(OAuth2AccessToken token)
protected byte[] serializeRefreshToken(OAuth2RefreshToken token)
protected byte[] serializeAuthentication(OAuth2Authentication authentication)
protected OAuth2AccessToken deserializeAccessToken(byte[] token)
protected OAuth2RefreshToken deserializeRefreshToken(byte[] token)
protected OAuth2Authentication deserializeAuthentication(byte[] authentication)
public void setInsertAccessTokenSql(String insertAccessTokenSql)
public void setSelectAccessTokenSql(String selectAccessTokenSql)
public void setDeleteAccessTokenSql(String deleteAccessTokenSql)
public void setInsertRefreshTokenSql(String insertRefreshTokenSql)
public void setSelectRefreshTokenSql(String selectRefreshTokenSql)
public void setDeleteRefreshTokenSql(String deleteRefreshTokenSql)
public void setSelectAccessTokenAuthenticationSql(String selectAccessTokenAuthenticationSql)
public void setSelectRefreshTokenAuthenticationSql(String selectRefreshTokenAuthenticationSql)
public void setSelectAccessTokenFromAuthenticationSql(String selectAccessTokenFromAuthenticationSql)
public void setDeleteAccessTokenFromRefreshTokenSql(String deleteAccessTokenFromRefreshTokenSql)
public void setSelectAccessTokensFromUserNameSql(String selectAccessTokensFromUserNameSql)
public void setSelectAccessTokensFromUserNameAndClientIdSql(String selectAccessTokensFromUserNameAndClientIdSql)
public void setSelectAccessTokensFromClientIdSql(String selectAccessTokensFromClientIdSql)
Copyright © 2019. All rights reserved.