Record Class DeviceTokenStore.Redeemed

java.lang.Object
java.lang.Record
com.iizix.server.user.DeviceTokenStore.Redeemed
Record Components:
status - What the token is; everything below is set for DeviceTokenStore.Status.OK only.
uid - The user of the row.
deviceID - The device identifier of the row.
token - The token that replaces the presented one, for the device; null when the token was only looked at (DeviceTokenStore.peek(String, String, String)).
expires - When the row expires unless used, in epoch milliseconds.
staySignedIn - Whether the token is one to sign in with.
mfaTrustedUntil - Until when the device is trusted for MFA, zero for not.
Enclosing class:
DeviceTokenStore

public static record DeviceTokenStore.Redeemed(DeviceTokenStore.Status status, long uid, String deviceID, String token, long expires, boolean staySignedIn, long mfaTrustedUntil) extends Record
What became of a presented token.
Author:
Christopher Mindus
  • Constructor Details

    • Redeemed

      public Redeemed(DeviceTokenStore.Status status, long uid, String deviceID, String token, long expires, boolean staySignedIn, long mfaTrustedUntil)
      Creates an instance of a Redeemed record class.
      Parameters:
      status - the value for the status record component
      uid - the value for the uid record component
      deviceID - the value for the deviceID record component
      token - the value for the token record component
      expires - the value for the expires record component
      staySignedIn - the value for the staySignedIn record component
      mfaTrustedUntil - the value for the mfaTrustedUntil record component
  • Method Details

    • isAccepted

      public boolean isAccepted()
      Tells whether the token was accepted.
      Returns:
      true for DeviceTokenStore.Status.OK.
    • toString

      public String toString()
      Describes this instance without its token.
      Specified by:
      toString in class Record
      Returns:
      The description.
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • status

      public DeviceTokenStore.Status status()
      Returns the value of the status record component.
      Returns:
      the value of the status record component
    • uid

      public long uid()
      Returns the value of the uid record component.
      Returns:
      the value of the uid record component
    • deviceID

      public String deviceID()
      Returns the value of the deviceID record component.
      Returns:
      the value of the deviceID record component
    • token

      public String token()
      Returns the value of the token record component.
      Returns:
      the value of the token record component
    • expires

      public long expires()
      Returns the value of the expires record component.
      Returns:
      the value of the expires record component
    • staySignedIn

      public boolean staySignedIn()
      Returns the value of the staySignedIn record component.
      Returns:
      the value of the staySignedIn record component
    • mfaTrustedUntil

      public long mfaTrustedUntil()
      Returns the value of the mfaTrustedUntil record component.
      Returns:
      the value of the mfaTrustedUntil record component