Class JpaOAuth2Authorization

java.lang.Object
com.broadleafcommerce.auth.authorization.provider.jpa.domain.JpaOAuth2Authorization
All Implemented Interfaces:
Serializable

@Entity public class JpaOAuth2Authorization extends Object implements Serializable
Domain supporting Spring's OAuth2Authorization persistence.

Note - the FetchType.LAZY loading of various columns requires instrumentation via the 'hibernate-enhance-maven-plugin'.

See Also:
  • Constructor Details

    • JpaOAuth2Authorization

      public JpaOAuth2Authorization()
  • Method Details

    • fromMe

      public org.springframework.security.oauth2.server.authorization.OAuth2Authorization fromMe(com.fasterxml.jackson.databind.ObjectMapper mapper)
    • toMe

      public JpaOAuth2Authorization toMe(org.springframework.security.oauth2.server.authorization.OAuth2Authorization authorization, com.fasterxml.jackson.databind.ObjectMapper mapper)
    • getId

      public String getId()
    • getRegisteredClientId

      public String getRegisteredClientId()
    • getPrincipalName

      public String getPrincipalName()
    • getAuthorizationGrantType

      public String getAuthorizationGrantType()
    • getAuthorizedScopes

      public String getAuthorizedScopes()
    • getAttributes

      public String getAttributes()
    • getState

      public String getState()
    • getAuthorizationCodeValue

      public String getAuthorizationCodeValue()
    • getAuthorizationCodeIssuedAt

      public Long getAuthorizationCodeIssuedAt()
    • getAuthorizationCodeExpiresAt

      public Long getAuthorizationCodeExpiresAt()
    • getAuthorizationCodeMetadata

      public String getAuthorizationCodeMetadata()
    • getAccessTokenValue

      public String getAccessTokenValue()
      See Also:
    • getAccessTokenValueHash

      public String getAccessTokenValueHash()
      The column length of getAccessTokenValue() forces it to be a non-queryable, non-indexable Lob on certain database providers.

      This column should contain some hashed representation of the getAccessTokenValue() (if present). The main idea is for indexing and queries to be run against this smaller hash rather than the raw value directly.

      Note - the hashing algorithm must be strongly collision resistant to minimize the chances of multiple values sharing the same hash. Furthermore, even with a strong hashing algorithm, all queries must account for the fact that collisions are inevitable and should not assume that a query for a particular hash will only ever return a single result. Queries should examine the result list, and if more than one result is returned for the same hash, perform direct in-memory comparison of getAccessTokenValue() to drop unexpected results.

      See Also:
    • getAccessTokenIssuedAt

      public Long getAccessTokenIssuedAt()
    • getAccessTokenExpiresAt

      public Long getAccessTokenExpiresAt()
    • getAccessTokenMetadata

      public String getAccessTokenMetadata()
    • getAccessTokenType

      public String getAccessTokenType()
    • getAccessTokenScopes

      public String getAccessTokenScopes()
    • getOidcIdTokenValue

      public String getOidcIdTokenValue()
      See Also:
    • getOidcIdTokenValueHash

      public String getOidcIdTokenValueHash()
      The column length of getOidcIdTokenValue() forces it to be a non-queryable, non-indexable Lob on certain database providers.

      This column should contain some hashed representation of the getOidcIdTokenValue() (if present). The main idea is for indexing and queries to be run against this smaller hash rather than the raw value directly.

      Note - the hashing algorithm must be strongly collision resistant to minimize the chances of multiple values sharing the same hash. Furthermore, even with a strong hashing algorithm, all queries must account for the fact that collisions are inevitable and should not assume that a query for a particular hash will only ever return a single result. Queries should examine the result list, and if more than one result is returned for the same hash, perform direct in-memory comparison of getOidcIdTokenValue() to drop unexpected results.

      See Also:
    • getOidcIdTokenIssuedAt

      public Long getOidcIdTokenIssuedAt()
    • getOicdIdTokenExpiresAt

      public Long getOicdIdTokenExpiresAt()
    • getOidcIdTokenMetadata

      public String getOidcIdTokenMetadata()
    • getRefreshTokenValue

      public String getRefreshTokenValue()
    • getOid

      public String getOid()
    • getRefreshTokenIssuedAt

      public Long getRefreshTokenIssuedAt()
    • getRefreshTokenExpiresAt

      public Long getRefreshTokenExpiresAt()
    • getRefreshTokenMetadata

      public String getRefreshTokenMetadata()
    • getUserCodeValue

      public String getUserCodeValue()
    • getUserCodeIssuedAt

      public Long getUserCodeIssuedAt()
    • getUserCodeExpiresAt

      public Long getUserCodeExpiresAt()
    • getUserCodeMetadata

      public String getUserCodeMetadata()
    • getDeviceCodeValue

      public String getDeviceCodeValue()
    • getDeviceCodeIssuedAt

      public Long getDeviceCodeIssuedAt()
    • getDeviceCodeExpiresAt

      public Long getDeviceCodeExpiresAt()
    • getDeviceCodeMetadata

      public String getDeviceCodeMetadata()
    • setId

      public void setId(String id)
    • setRegisteredClientId

      public void setRegisteredClientId(String registeredClientId)
    • setPrincipalName

      public void setPrincipalName(String principalName)
    • setAuthorizationGrantType

      public void setAuthorizationGrantType(String authorizationGrantType)
    • setAuthorizedScopes

      public void setAuthorizedScopes(String authorizedScopes)
    • setAttributes

      public void setAttributes(String attributes)
    • setState

      public void setState(String state)
    • setAuthorizationCodeValue

      public void setAuthorizationCodeValue(String authorizationCodeValue)
    • setAuthorizationCodeIssuedAt

      public void setAuthorizationCodeIssuedAt(Long authorizationCodeIssuedAt)
    • setAuthorizationCodeExpiresAt

      public void setAuthorizationCodeExpiresAt(Long authorizationCodeExpiresAt)
    • setAuthorizationCodeMetadata

      public void setAuthorizationCodeMetadata(String authorizationCodeMetadata)
    • setAccessTokenValue

      public void setAccessTokenValue(String accessTokenValue)
      See Also:
    • setAccessTokenValueHash

      public void setAccessTokenValueHash(String accessTokenValueHash)
      The column length of getAccessTokenValue() forces it to be a non-queryable, non-indexable Lob on certain database providers.

      This column should contain some hashed representation of the getAccessTokenValue() (if present). The main idea is for indexing and queries to be run against this smaller hash rather than the raw value directly.

      Note - the hashing algorithm must be strongly collision resistant to minimize the chances of multiple values sharing the same hash. Furthermore, even with a strong hashing algorithm, all queries must account for the fact that collisions are inevitable and should not assume that a query for a particular hash will only ever return a single result. Queries should examine the result list, and if more than one result is returned for the same hash, perform direct in-memory comparison of getAccessTokenValue() to drop unexpected results.

      See Also:
    • setAccessTokenIssuedAt

      public void setAccessTokenIssuedAt(Long accessTokenIssuedAt)
    • setAccessTokenExpiresAt

      public void setAccessTokenExpiresAt(Long accessTokenExpiresAt)
    • setAccessTokenMetadata

      public void setAccessTokenMetadata(String accessTokenMetadata)
    • setAccessTokenType

      public void setAccessTokenType(String accessTokenType)
    • setAccessTokenScopes

      public void setAccessTokenScopes(String accessTokenScopes)
    • setOidcIdTokenValue

      public void setOidcIdTokenValue(String oidcIdTokenValue)
      See Also:
    • setOidcIdTokenValueHash

      public void setOidcIdTokenValueHash(String oidcIdTokenValueHash)
      The column length of getOidcIdTokenValue() forces it to be a non-queryable, non-indexable Lob on certain database providers.

      This column should contain some hashed representation of the getOidcIdTokenValue() (if present). The main idea is for indexing and queries to be run against this smaller hash rather than the raw value directly.

      Note - the hashing algorithm must be strongly collision resistant to minimize the chances of multiple values sharing the same hash. Furthermore, even with a strong hashing algorithm, all queries must account for the fact that collisions are inevitable and should not assume that a query for a particular hash will only ever return a single result. Queries should examine the result list, and if more than one result is returned for the same hash, perform direct in-memory comparison of getOidcIdTokenValue() to drop unexpected results.

      See Also:
    • setOidcIdTokenIssuedAt

      public void setOidcIdTokenIssuedAt(Long oidcIdTokenIssuedAt)
    • setOicdIdTokenExpiresAt

      public void setOicdIdTokenExpiresAt(Long oicdIdTokenExpiresAt)
    • setOidcIdTokenMetadata

      public void setOidcIdTokenMetadata(String oidcIdTokenMetadata)
    • setRefreshTokenValue

      public void setRefreshTokenValue(String refreshTokenValue)
    • setOid

      public void setOid(String oid)
    • setRefreshTokenIssuedAt

      public void setRefreshTokenIssuedAt(Long refreshTokenIssuedAt)
    • setRefreshTokenExpiresAt

      public void setRefreshTokenExpiresAt(Long refreshTokenExpiresAt)
    • setRefreshTokenMetadata

      public void setRefreshTokenMetadata(String refreshTokenMetadata)
    • setUserCodeValue

      public void setUserCodeValue(String userCodeValue)
    • setUserCodeIssuedAt

      public void setUserCodeIssuedAt(Long userCodeIssuedAt)
    • setUserCodeExpiresAt

      public void setUserCodeExpiresAt(Long userCodeExpiresAt)
    • setUserCodeMetadata

      public void setUserCodeMetadata(String userCodeMetadata)
    • setDeviceCodeValue

      public void setDeviceCodeValue(String deviceCodeValue)
    • setDeviceCodeIssuedAt

      public void setDeviceCodeIssuedAt(Long deviceCodeIssuedAt)
    • setDeviceCodeExpiresAt

      public void setDeviceCodeExpiresAt(Long deviceCodeExpiresAt)
    • setDeviceCodeMetadata

      public void setDeviceCodeMetadata(String deviceCodeMetadata)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object