Backend API. Server-side code: this runs in a Codename One backend, not in the app on the device.
public final class TotpCredential
- Object
- 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
usernameString- Not documented.
secretbyte[]- Not documented.
confirmedboolean- whether the user has proved the app works, by entering a code from it; until then the secret is not a second factor
lastUsedSteplong- 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()