Record Class MFAStore.Row

java.lang.Object
java.lang.Record
com.iizix.server.user.mfa.MFAStore.Row
Record Components:
uid - The user ID.
method - The method of the factor, totp; passkey for a user whose second factor is a passkey and no authenticator app (CC-FIX-SIGNIN-2FA-CHOICE): the row then holds no secret, and is what tells that the user has a second factor, with its recovery codes and its count of invalid codes.
sealedSecret - The shared secret, sealed: never the clear secret.
algorithm - The hashing algorithm the app was enrolled with.
digits - The number of digits of a code.
period - The time in seconds a code is valid.
created - The time the enrolment was confirmed, milliseconds since the epoch.
lastStep - The time step of the last accepted code.
lastUsed - The time a code was last accepted, zero for never.
lastFail - The time of the last invalid code, zero for none.
failCount - The invalid codes since the last accepted one.
issuer - The issuer of the entry the authenticator app shows, as the enrolment's QR code carried it (CC-FIX-SIGNIN-RECOVERY); null for an enrolment made before it was stored, and for a passkey row.
account - The account of that entry, the user name at the enrolment; null as the issuer.
Enclosing class:
MFAStore

public static record MFAStore.Row(long uid, String method, String sealedSecret, String algorithm, int digits, int period, long created, long lastStep, long lastUsed, long lastFail, int failCount, String issuer, String account) extends Record
The second factor of a user, as stored.
Author:
Christopher Mindus
  • Constructor Summary

    Constructors
    Constructor
    Description
    Row(long uid, String method, String sealedSecret, String algorithm, int digits, int period, long created, long lastStep, long lastUsed, long lastFail, int failCount)
    A row without the names of the entry: an enrolment made before CC-FIX-SIGNIN-RECOVERY stored none, and a passkey row has no entry.
    Row(long uid, String method, String sealedSecret, String algorithm, int digits, int period, long created, long lastStep, long lastUsed, long lastFail, int failCount, String issuer, String account)
    Creates an instance of a Row record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the value of the account record component.
    Returns the value of the algorithm record component.
    long
    Returns the value of the created record component.
    int
    Returns the value of the digits record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    int
    Returns the value of the failCount record component.
    final int
    Returns a hash code value for this object.
    Returns the value of the issuer record component.
    long
    Returns the value of the lastFail record component.
    long
    Returns the value of the lastStep record component.
    long
    Returns the value of the lastUsed record component.
    Returns the value of the method record component.
    int
    Returns the value of the period record component.
    Returns the value of the sealedSecret record component.
    Gets the row without its sealed secret, for a log or a debugger.
    long
    uid()
    Returns the value of the uid record component.

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • Row

      public Row(long uid, String method, String sealedSecret, String algorithm, int digits, int period, long created, long lastStep, long lastUsed, long lastFail, int failCount)
      A row without the names of the entry: an enrolment made before CC-FIX-SIGNIN-RECOVERY stored none, and a passkey row has no entry.
      Parameters:
      uid - The user ID.
      method - The method of the factor.
      sealedSecret - The shared secret, sealed.
      algorithm - The hashing algorithm.
      digits - The number of digits of a code.
      period - The time in seconds a code is valid.
      created - The time the enrolment was confirmed.
      lastStep - The time step of the last accepted code.
      lastUsed - The time a code was last accepted, zero for never.
      lastFail - The time of the last invalid code, zero for none.
      failCount - The invalid codes since the last accepted one.
    • Row

      public Row(long uid, String method, String sealedSecret, String algorithm, int digits, int period, long created, long lastStep, long lastUsed, long lastFail, int failCount, String issuer, String account)
      Creates an instance of a Row record class.
      Parameters:
      uid - the value for the uid record component
      method - the value for the method record component
      sealedSecret - the value for the sealedSecret record component
      algorithm - the value for the algorithm record component
      digits - the value for the digits record component
      period - the value for the period record component
      created - the value for the created record component
      lastStep - the value for the lastStep record component
      lastUsed - the value for the lastUsed record component
      lastFail - the value for the lastFail record component
      failCount - the value for the failCount record component
      issuer - the value for the issuer record component
      account - the value for the account record component
  • Method Details

    • toString

      public String toString()
      Gets the row without its sealed secret, for a log or a debugger.
      Specified by:
      toString in class Record
      Returns:
      The text.
    • 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.
    • uid

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

      public String method()
      Returns the value of the method record component.
      Returns:
      the value of the method record component
    • sealedSecret

      public String sealedSecret()
      Returns the value of the sealedSecret record component.
      Returns:
      the value of the sealedSecret record component
    • algorithm

      public String algorithm()
      Returns the value of the algorithm record component.
      Returns:
      the value of the algorithm record component
    • digits

      public int digits()
      Returns the value of the digits record component.
      Returns:
      the value of the digits record component
    • period

      public int period()
      Returns the value of the period record component.
      Returns:
      the value of the period record component
    • created

      public long created()
      Returns the value of the created record component.
      Returns:
      the value of the created record component
    • lastStep

      public long lastStep()
      Returns the value of the lastStep record component.
      Returns:
      the value of the lastStep record component
    • lastUsed

      public long lastUsed()
      Returns the value of the lastUsed record component.
      Returns:
      the value of the lastUsed record component
    • lastFail

      public long lastFail()
      Returns the value of the lastFail record component.
      Returns:
      the value of the lastFail record component
    • failCount

      public int failCount()
      Returns the value of the failCount record component.
      Returns:
      the value of the failCount record component
    • issuer

      public String issuer()
      Returns the value of the issuer record component.
      Returns:
      the value of the issuer record component
    • account

      public String account()
      Returns the value of the account record component.
      Returns:
      the value of the account record component