Class 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
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected org.springframework.security.oauth2.common.OAuth2AccessToken deserializeAccessToken​(byte[] token)  
      protected org.springframework.security.oauth2.provider.OAuth2Authentication deserializeAuthentication​(byte[] authentication)  
      protected org.springframework.security.oauth2.common.OAuth2RefreshToken deserializeRefreshToken​(byte[] token)  
      protected java.lang.String extractTokenKey​(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.OAuth2AccessToken getAccessToken​(org.springframework.security.oauth2.provider.OAuth2Authentication authentication)  
      OAuthTokenService getOauthTokenService()  
      org.springframework.security.oauth2.common.OAuth2AccessToken readAccessToken​(java.lang.String tokenValue)  
      org.springframework.security.oauth2.provider.OAuth2Authentication readAuthentication​(java.lang.String token)  
      org.springframework.security.oauth2.provider.OAuth2Authentication readAuthentication​(org.springframework.security.oauth2.common.OAuth2AccessToken token)  
      org.springframework.security.oauth2.provider.OAuth2Authentication readAuthenticationForRefreshToken​(java.lang.String value)  
      org.springframework.security.oauth2.provider.OAuth2Authentication readAuthenticationForRefreshToken​(org.springframework.security.oauth2.common.OAuth2RefreshToken token)  
      org.springframework.security.oauth2.common.OAuth2RefreshToken readRefreshToken​(java.lang.String token)  
      void removeAccessToken​(java.lang.String tokenValue)  
      void removeAccessToken​(org.springframework.security.oauth2.common.OAuth2AccessToken token)  
      void removeAccessTokenUsingRefreshToken​(java.lang.String refreshToken)  
      void removeAccessTokenUsingRefreshToken​(org.springframework.security.oauth2.common.OAuth2RefreshToken refreshToken)  
      void removeRefreshToken​(java.lang.String token)  
      void removeRefreshToken​(org.springframework.security.oauth2.common.OAuth2RefreshToken token)  
      protected void replaceToken​(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)  
      void setOauthTokenService​(OAuthTokenService oauthTokenService)  
      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)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • HybrisOAuthTokenStore

        public HybrisOAuthTokenStore()
    • Method Detail

      • getAccessToken

        public org.springframework.security.oauth2.common.OAuth2AccessToken getAccessToken​(org.springframework.security.oauth2.provider.OAuth2Authentication authentication)
        Specified by:
        getAccessToken in interface org.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:
        storeAccessToken in interface org.springframework.security.oauth2.provider.token.TokenStore
      • readAccessToken

        public org.springframework.security.oauth2.common.OAuth2AccessToken readAccessToken​(java.lang.String tokenValue)
        Specified by:
        readAccessToken in interface org.springframework.security.oauth2.provider.token.TokenStore
      • removeAccessToken

        public void removeAccessToken​(org.springframework.security.oauth2.common.OAuth2AccessToken token)
        Specified by:
        removeAccessToken in interface org.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:
        readAuthentication in interface org.springframework.security.oauth2.provider.token.TokenStore
      • readAuthentication

        public org.springframework.security.oauth2.provider.OAuth2Authentication readAuthentication​(java.lang.String token)
        Specified by:
        readAuthentication in interface org.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:
        storeRefreshToken in interface org.springframework.security.oauth2.provider.token.TokenStore
      • readRefreshToken

        public org.springframework.security.oauth2.common.OAuth2RefreshToken readRefreshToken​(java.lang.String token)
        Specified by:
        readRefreshToken in interface org.springframework.security.oauth2.provider.token.TokenStore
      • removeRefreshToken

        public void removeRefreshToken​(org.springframework.security.oauth2.common.OAuth2RefreshToken token)
        Specified by:
        removeRefreshToken in interface org.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:
        readAuthenticationForRefreshToken in interface org.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:
        removeAccessTokenUsingRefreshToken in interface org.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:
        findTokensByClientId in interface org.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:
        findTokensByClientIdAndUserName in interface org.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)
      • setOauthTokenService

        public void setOauthTokenService​(OAuthTokenService oauthTokenService)