Class TotpCredential

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

public final class TotpCredential extends Object
What the server keeps of one user's authenticator app.
  • Constructor Details

    • TotpCredential

      public TotpCredential(String username, byte[] secret, boolean confirmed, long lastUsedStep)
      Parameters:
      confirmed - whether the user has proved the app works, by entering a code from it; until then the secret is not a second factor
      lastUsedStep - the time step of the last code accepted, or -1
  • Method Details

    • getUsername

      public String getUsername()
    • getSecret

      public byte[] getSecret()
      The shared secret.
    • isConfirmed

      public boolean isConfirmed()
    • getLastUsedStep

      public long getLastUsedStep()