Backend API. Server-side code: this runs in a Codename One backend, not in the app on the device.

public final class TotpCredential

  1. Object
  2. TotpCredential
What the server keeps of one user’s authenticator app.

Constructors

public TotpCredential(String username, byte[] secret, boolean confirmed, long lastUsedStep)

Methods

public String getUsername()
public byte[] getSecret()The shared secret.
public boolean isConfirmed()
public long getLastUsedStep()

Inherited methods

Constructor details

TotpCredential

public TotpCredential(String username, byte[] secret, boolean confirmed, long lastUsedStep)

Parameters

username String
Not documented.
secret byte[]
Not documented.
confirmed boolean
whether the user has proved the app works, by entering a code from it; until then the secret is not a second factor
lastUsedStep long
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()