@Service public class ApiTokenStore extends Object implements org.springframework.security.oauth2.provider.token.TokenStore
| Constructor and Description |
|---|
ApiTokenStore() |
| Modifier and Type | Method and Description |
|---|---|
void |
cleanExpiredTokens() |
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.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 token) |
org.springframework.security.oauth2.provider.OAuth2Authentication |
readAuthenticationForRefreshToken(org.springframework.security.oauth2.common.OAuth2RefreshToken token) |
org.springframework.security.oauth2.provider.OAuth2Authentication |
readAuthenticationForRefreshToken(String tokenValue) |
org.springframework.security.oauth2.common.OAuth2RefreshToken |
readRefreshToken(String tokenValue) |
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 tokenValue) |
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) |
@Scheduled(cron="0 2 * * * *") public void cleanExpiredTokens()
public org.springframework.security.oauth2.provider.OAuth2Authentication readAuthentication(org.springframework.security.oauth2.common.OAuth2AccessToken token)
readAuthentication in interface org.springframework.security.oauth2.provider.token.TokenStorepublic org.springframework.security.oauth2.provider.OAuth2Authentication readAuthentication(String token)
readAuthentication in interface org.springframework.security.oauth2.provider.token.TokenStorepublic 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.TokenStorepublic org.springframework.security.oauth2.common.OAuth2AccessToken readAccessToken(String tokenValue)
readAccessToken in interface org.springframework.security.oauth2.provider.token.TokenStorepublic void removeAccessToken(org.springframework.security.oauth2.common.OAuth2AccessToken token)
removeAccessToken in interface org.springframework.security.oauth2.provider.token.TokenStorepublic void removeAccessToken(String tokenValue)
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 tokenValue)
readRefreshToken in interface org.springframework.security.oauth2.provider.token.TokenStorepublic 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 tokenValue)
public void removeRefreshToken(org.springframework.security.oauth2.common.OAuth2RefreshToken token)
removeRefreshToken in interface org.springframework.security.oauth2.provider.token.TokenStorepublic void removeRefreshToken(String tokenValue)
public void removeAccessTokenUsingRefreshToken(org.springframework.security.oauth2.common.OAuth2RefreshToken refreshToken)
removeAccessTokenUsingRefreshToken in interface org.springframework.security.oauth2.provider.token.TokenStorepublic 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> findTokensByClientId(String clientId)
findTokensByClientId 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.TokenStoreCopyright © 2017. All rights reserved.