Class EmailCode

java.lang.Object
com.codename1.backend.security.mfa.EmailCode

public final class EmailCode extends Object
What an EmailCodeRepository holds for one user.
  • Constructor Summary

    Constructors
    Constructor
    Description
    EmailCode(boolean enabled, String codeHash, long expiresAt, int attempts, long sentAt)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    How many times a code has been tried against the waiting one.
    The hash of the code that is waiting to be entered; empty when none is.
    long
    When the waiting code stops working, epoch milliseconds.
    long
    When the waiting code was mailed, epoch milliseconds.
    boolean
    Whether the user signs in with a mailed code.

    Methods inherited from class Object

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

    • EmailCode

      public EmailCode(boolean enabled, String codeHash, long expiresAt, int attempts, long sentAt)
  • Method Details

    • isEnabled

      public boolean isEnabled()
      Whether the user signs in with a mailed code.
    • getCodeHash

      public String getCodeHash()
      The hash of the code that is waiting to be entered; empty when none is.
    • getExpiresAt

      public long getExpiresAt()
      When the waiting code stops working, epoch milliseconds.
    • getAttempts

      public int getAttempts()
      How many times a code has been tried against the waiting one.
    • getSentAt

      public long getSentAt()
      When the waiting code was mailed, epoch milliseconds.