Class HybrisOAuthTokenStore
- java.lang.Object
-
- de.hybris.platform.webservicescommons.oauth2.token.provider.HybrisOAuthTokenStore
-
- All Implemented Interfaces:
org.springframework.security.oauth2.provider.token.TokenStore
public class HybrisOAuthTokenStore extends java.lang.Object implements org.springframework.security.oauth2.provider.token.TokenStore
-
-
Constructor Summary
Constructors Constructor Description HybrisOAuthTokenStore()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.springframework.security.oauth2.common.OAuth2AccessTokendeserializeAccessToken(byte[] token)protected org.springframework.security.oauth2.provider.OAuth2AuthenticationdeserializeAuthentication(byte[] authentication)protected org.springframework.security.oauth2.common.OAuth2RefreshTokendeserializeRefreshToken(byte[] token)protected java.lang.StringextractTokenKey(java.lang.String value)java.util.Collection<org.springframework.security.oauth2.common.OAuth2AccessToken>findTokensByClientId(java.lang.String clientId)java.util.Collection<org.springframework.security.oauth2.common.OAuth2AccessToken>findTokensByClientIdAndUserName(java.lang.String clientId, java.lang.String userName)java.util.Collection<org.springframework.security.oauth2.common.OAuth2AccessToken>findTokensByUserName(java.lang.String userName)org.springframework.security.oauth2.common.OAuth2AccessTokengetAccessToken(org.springframework.security.oauth2.provider.OAuth2Authentication authentication)OAuthTokenServicegetOauthTokenService()org.springframework.security.oauth2.common.OAuth2AccessTokenreadAccessToken(java.lang.String tokenValue)org.springframework.security.oauth2.provider.OAuth2AuthenticationreadAuthentication(java.lang.String token)org.springframework.security.oauth2.provider.OAuth2AuthenticationreadAuthentication(org.springframework.security.oauth2.common.OAuth2AccessToken token)org.springframework.security.oauth2.provider.OAuth2AuthenticationreadAuthenticationForRefreshToken(java.lang.String value)org.springframework.security.oauth2.provider.OAuth2AuthenticationreadAuthenticationForRefreshToken(org.springframework.security.oauth2.common.OAuth2RefreshToken token)org.springframework.security.oauth2.common.OAuth2RefreshTokenreadRefreshToken(java.lang.String token)voidremoveAccessToken(java.lang.String tokenValue)voidremoveAccessToken(org.springframework.security.oauth2.common.OAuth2AccessToken token)voidremoveAccessTokenUsingRefreshToken(java.lang.String refreshToken)voidremoveAccessTokenUsingRefreshToken(org.springframework.security.oauth2.common.OAuth2RefreshToken refreshToken)voidremoveRefreshToken(java.lang.String token)voidremoveRefreshToken(org.springframework.security.oauth2.common.OAuth2RefreshToken token)protected voidreplaceToken(org.springframework.security.oauth2.provider.OAuth2Authentication authentication, org.springframework.security.oauth2.common.OAuth2AccessToken accessToken)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)voidsetOauthTokenService(OAuthTokenService oauthTokenService)voidstoreAccessToken(org.springframework.security.oauth2.common.OAuth2AccessToken token, org.springframework.security.oauth2.provider.OAuth2Authentication authentication)voidstoreRefreshToken(org.springframework.security.oauth2.common.OAuth2RefreshToken refreshToken, org.springframework.security.oauth2.provider.OAuth2Authentication authentication)
-
-
-
Method Detail
-
getAccessToken
public org.springframework.security.oauth2.common.OAuth2AccessToken getAccessToken(org.springframework.security.oauth2.provider.OAuth2Authentication authentication)
- Specified by:
getAccessTokenin interfaceorg.springframework.security.oauth2.provider.token.TokenStore
-
replaceToken
protected void replaceToken(org.springframework.security.oauth2.provider.OAuth2Authentication authentication, org.springframework.security.oauth2.common.OAuth2AccessToken accessToken)
-
storeAccessToken
public void storeAccessToken(org.springframework.security.oauth2.common.OAuth2AccessToken token, org.springframework.security.oauth2.provider.OAuth2Authentication authentication)- Specified by:
storeAccessTokenin interfaceorg.springframework.security.oauth2.provider.token.TokenStore
-
readAccessToken
public org.springframework.security.oauth2.common.OAuth2AccessToken readAccessToken(java.lang.String tokenValue)
- Specified by:
readAccessTokenin interfaceorg.springframework.security.oauth2.provider.token.TokenStore
-
removeAccessToken
public void removeAccessToken(org.springframework.security.oauth2.common.OAuth2AccessToken token)
- Specified by:
removeAccessTokenin interfaceorg.springframework.security.oauth2.provider.token.TokenStore
-
removeAccessToken
public void removeAccessToken(java.lang.String tokenValue)
-
readAuthentication
public org.springframework.security.oauth2.provider.OAuth2Authentication readAuthentication(org.springframework.security.oauth2.common.OAuth2AccessToken token)
- Specified by:
readAuthenticationin interfaceorg.springframework.security.oauth2.provider.token.TokenStore
-
readAuthentication
public org.springframework.security.oauth2.provider.OAuth2Authentication readAuthentication(java.lang.String token)
- Specified by:
readAuthenticationin interfaceorg.springframework.security.oauth2.provider.token.TokenStore
-
storeRefreshToken
public void storeRefreshToken(org.springframework.security.oauth2.common.OAuth2RefreshToken refreshToken, org.springframework.security.oauth2.provider.OAuth2Authentication authentication)- Specified by:
storeRefreshTokenin interfaceorg.springframework.security.oauth2.provider.token.TokenStore
-
readRefreshToken
public org.springframework.security.oauth2.common.OAuth2RefreshToken readRefreshToken(java.lang.String token)
- Specified by:
readRefreshTokenin interfaceorg.springframework.security.oauth2.provider.token.TokenStore
-
removeRefreshToken
public void removeRefreshToken(org.springframework.security.oauth2.common.OAuth2RefreshToken token)
- Specified by:
removeRefreshTokenin interfaceorg.springframework.security.oauth2.provider.token.TokenStore
-
removeRefreshToken
public void removeRefreshToken(java.lang.String token)
-
readAuthenticationForRefreshToken
public org.springframework.security.oauth2.provider.OAuth2Authentication readAuthenticationForRefreshToken(org.springframework.security.oauth2.common.OAuth2RefreshToken token)
- Specified by:
readAuthenticationForRefreshTokenin interfaceorg.springframework.security.oauth2.provider.token.TokenStore
-
readAuthenticationForRefreshToken
public org.springframework.security.oauth2.provider.OAuth2Authentication readAuthenticationForRefreshToken(java.lang.String value)
-
removeAccessTokenUsingRefreshToken
public void removeAccessTokenUsingRefreshToken(org.springframework.security.oauth2.common.OAuth2RefreshToken refreshToken)
- Specified by:
removeAccessTokenUsingRefreshTokenin interfaceorg.springframework.security.oauth2.provider.token.TokenStore
-
removeAccessTokenUsingRefreshToken
public void removeAccessTokenUsingRefreshToken(java.lang.String refreshToken)
-
findTokensByClientId
public java.util.Collection<org.springframework.security.oauth2.common.OAuth2AccessToken> findTokensByClientId(java.lang.String clientId)
- Specified by:
findTokensByClientIdin interfaceorg.springframework.security.oauth2.provider.token.TokenStore
-
findTokensByClientIdAndUserName
public java.util.Collection<org.springframework.security.oauth2.common.OAuth2AccessToken> findTokensByClientIdAndUserName(java.lang.String clientId, java.lang.String userName)- Specified by:
findTokensByClientIdAndUserNamein interfaceorg.springframework.security.oauth2.provider.token.TokenStore
-
findTokensByUserName
public java.util.Collection<org.springframework.security.oauth2.common.OAuth2AccessToken> findTokensByUserName(java.lang.String userName)
-
extractTokenKey
protected java.lang.String extractTokenKey(java.lang.String value)
-
serializeAccessToken
protected byte[] serializeAccessToken(org.springframework.security.oauth2.common.OAuth2AccessToken token)
-
serializeRefreshToken
protected byte[] serializeRefreshToken(org.springframework.security.oauth2.common.OAuth2RefreshToken token)
-
serializeAuthentication
protected byte[] serializeAuthentication(org.springframework.security.oauth2.provider.OAuth2Authentication authentication)
-
deserializeAccessToken
protected org.springframework.security.oauth2.common.OAuth2AccessToken deserializeAccessToken(byte[] token)
-
deserializeRefreshToken
protected org.springframework.security.oauth2.common.OAuth2RefreshToken deserializeRefreshToken(byte[] token)
-
deserializeAuthentication
protected org.springframework.security.oauth2.provider.OAuth2Authentication deserializeAuthentication(byte[] authentication)
-
getOauthTokenService
public OAuthTokenService getOauthTokenService()
-
setOauthTokenService
public void setOauthTokenService(OAuthTokenService oauthTokenService)
-
-