Class UserSessionRefreshToken

java.lang.Object
com.kingsrook.qqq.backend.core.model.data.QRecordEntity
com.kingsrook.qqq.backend.core.modules.authentication.implementations.model.UserSessionRefreshToken

public class UserSessionRefreshToken extends QRecordEntity
QRecord Entity for the UserSessionRefreshToken table - server-side storage of OAuth2 refresh tokens, one row per userSession (keyed by sessionUuid). Kept in its own table (rather than as columns on userSession) so that apps opt in by defining this table (see UserSessionRefreshTokenMetaDataProducer) - existing userSession schemas need no migration. Rows from this table must never be exposed to users: the table is hidden and permission-locked, and the refreshToken field is hidden (so it is omitted from standard query/get results). The refreshToken value is stored encrypted (see RefreshTokenCipher) - only OAuth2AuthenticationModule decrypts it.
  • Field Details

  • Constructor Details

    • UserSessionRefreshToken

      public UserSessionRefreshToken()
      Default constructor
    • UserSessionRefreshToken

      public UserSessionRefreshToken(QRecord record)
      Constructor that takes a QRecord
  • Method Details

    • getId

      public Integer getId()
      Getter for id - Primary key
    • setId

      public void setId(Integer id)
      Setter for id
    • withId

      public UserSessionRefreshToken withId(Integer id)
      Fluent setter for id
    • getCreateDate

      public Instant getCreateDate()
      Getter for createDate - Create date
    • setCreateDate

      public void setCreateDate(Instant createDate)
      Setter for createDate
    • withCreateDate

      public UserSessionRefreshToken withCreateDate(Instant createDate)
      Fluent setter for createDate
    • getModifyDate

      public Instant getModifyDate()
      Getter for modifyDate - Modify date
    • setModifyDate

      public void setModifyDate(Instant modifyDate)
      Setter for modifyDate
    • withModifyDate

      public UserSessionRefreshToken withModifyDate(Instant modifyDate)
      Fluent setter for modifyDate
    • getSessionUuid

      public String getSessionUuid()
      Getter for sessionUuid - UUID of the userSession this refresh token belongs to
    • setSessionUuid

      public void setSessionUuid(String sessionUuid)
      Setter for sessionUuid
    • withSessionUuid

      public UserSessionRefreshToken withSessionUuid(String sessionUuid)
      Fluent setter for sessionUuid
    • getRefreshToken

      public String getRefreshToken()
      Getter for refreshToken - The refresh token itself - server-side only; never sent to a client or logged
    • setRefreshToken

      public void setRefreshToken(String refreshToken)
      Setter for refreshToken
    • withRefreshToken

      public UserSessionRefreshToken withRefreshToken(String refreshToken)
      Fluent setter for refreshToken
    • getRefreshTokenExpiresAt

      public Instant getRefreshTokenExpiresAt()
      Getter for refreshTokenExpiresAt - When the refresh token expires, if the provider said (e.g., refresh_expires_in); else null
    • setRefreshTokenExpiresAt

      public void setRefreshTokenExpiresAt(Instant refreshTokenExpiresAt)
      Setter for refreshTokenExpiresAt
    • withRefreshTokenExpiresAt

      public UserSessionRefreshToken withRefreshTokenExpiresAt(Instant refreshTokenExpiresAt)
      Fluent setter for refreshTokenExpiresAt
    • getSessionStartedAt

      public Instant getSessionStartedAt()
      Getter for sessionStartedAt - When the session was first created (the login), for maxSessionLifetimeSeconds
    • setSessionStartedAt

      public void setSessionStartedAt(Instant sessionStartedAt)
      Setter for sessionStartedAt
    • withSessionStartedAt

      public UserSessionRefreshToken withSessionStartedAt(Instant sessionStartedAt)
      Fluent setter for sessionStartedAt