Class JmixJdbcTokenStore

java.lang.Object
org.springframework.security.oauth2.provider.token.store.JdbcTokenStore
io.jmix.securityoauth2.token.store.JmixJdbcTokenStore
All Implemented Interfaces:
org.springframework.security.oauth2.provider.token.TokenStore

public class JmixJdbcTokenStore extends org.springframework.security.oauth2.provider.token.store.JdbcTokenStore
JdbcTokenStore that can properly deserialize Jmix entities in such a way that they support lazy loading after deserialization.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected org.springframework.security.oauth2.provider.token.AuthenticationKeyGenerator
     
    protected final org.springframework.jdbc.core.JdbcTemplate
     
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    JmixJdbcTokenStore(DataSource dataSource, StandardSerialization standardSerialization)
     
  • Method Summary

    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
     
    void
    setAuthenticationKeyGenerator(org.springframework.security.oauth2.provider.token.AuthenticationKeyGenerator authenticationKeyGenerator)
     
    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 org.springframework.security.oauth2.provider.token.store.JdbcTokenStore

    extractTokenKey, findTokensByClientId, findTokensByClientIdAndUserName, findTokensByUserName, getAccessToken, readAccessToken, readAuthentication, readAuthentication, readAuthenticationForRefreshToken, readAuthenticationForRefreshToken, readRefreshToken, removeAccessToken, removeAccessToken, removeAccessTokenUsingRefreshToken, removeAccessTokenUsingRefreshToken, removeRefreshToken, removeRefreshToken, serializeAccessToken, serializeAuthentication, serializeRefreshToken, setDeleteAccessTokenFromRefreshTokenSql, setDeleteAccessTokenSql, setDeleteRefreshTokenSql, setInsertAccessTokenSql, setInsertRefreshTokenSql, setSelectAccessTokenAuthenticationSql, setSelectAccessTokenFromAuthenticationSql, setSelectAccessTokensFromClientIdSql, setSelectAccessTokensFromUserNameAndClientIdSql, setSelectAccessTokensFromUserNameSql, setSelectAccessTokenSql, setSelectRefreshTokenAuthenticationSql, setSelectRefreshTokenSql

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • standardSerialization

      protected StandardSerialization standardSerialization
    • authenticationKeyGenerator

      protected org.springframework.security.oauth2.provider.token.AuthenticationKeyGenerator authenticationKeyGenerator
    • jdbcTemplate

      protected final org.springframework.jdbc.core.JdbcTemplate jdbcTemplate
  • Constructor Details

  • Method Details

    • setAuthenticationKeyGenerator

      public void setAuthenticationKeyGenerator(org.springframework.security.oauth2.provider.token.AuthenticationKeyGenerator authenticationKeyGenerator)
      Overrides:
      setAuthenticationKeyGenerator in class org.springframework.security.oauth2.provider.token.store.JdbcTokenStore
    • 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
      Overrides:
      storeAccessToken in class org.springframework.security.oauth2.provider.token.store.JdbcTokenStore
    • 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
      Overrides:
      storeRefreshToken in class org.springframework.security.oauth2.provider.token.store.JdbcTokenStore
    • deserializeAccessToken

      protected org.springframework.security.oauth2.common.OAuth2AccessToken deserializeAccessToken(byte[] token)
      Overrides:
      deserializeAccessToken in class org.springframework.security.oauth2.provider.token.store.JdbcTokenStore
    • deserializeRefreshToken

      protected org.springframework.security.oauth2.common.OAuth2RefreshToken deserializeRefreshToken(byte[] token)
      Overrides:
      deserializeRefreshToken in class org.springframework.security.oauth2.provider.token.store.JdbcTokenStore
    • deserializeAuthentication

      protected org.springframework.security.oauth2.provider.OAuth2Authentication deserializeAuthentication(byte[] authentication)
      Overrides:
      deserializeAuthentication in class org.springframework.security.oauth2.provider.token.store.JdbcTokenStore