public class Transaction
extends java.lang.Object
implements java.io.Serializable
A transaction is created when requesting to enroll. This transaction will be required to confirm the enrollment once the user added his TOTP account or received the SMS with the code.
Implements java.io.Serializable to make it easy to save on the session.
The transaction contains sensitive information like the transaction token and the recovery code. Keep in mind this
when considering possible storage options.
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getRecoveryCode() |
java.lang.String |
getTotpSecret()
Returns the TOTP secret to be encoded in a URI for QR code generation,
or manually entered if a camera is not available to the enrollment device.
|
java.lang.String |
getTransactionToken() |
java.lang.String |
totpURI(java.lang.String user,
java.lang.String issuer)
Returns the TOTP enrollment URI to be displayed in the QR code
|
public java.lang.String getTransactionToken()
public java.lang.String getRecoveryCode()
public java.lang.String getTotpSecret()
throws java.lang.IllegalStateException
java.lang.IllegalStateException - when there is no OTP secretpublic java.lang.String totpURI(java.lang.String user,
java.lang.String issuer)
throws java.lang.IllegalStateException
user - the user name or email of the accountissuer - the issuer of the account, usually the company or service namejava.lang.IllegalStateException - when there is no OTP secret