OathTokenCode

open class OathTokenCode

Represents a currently active OTP token.

Constructors

Link copied to clipboard
protected constructor(timeKeeper: TimeKeeper, code: String, start: Long, until: Long, tokenType: OathMechanism.TokenType)
Creates a OathTokenCode wrap with given data

Properties

Link copied to clipboard
private val code: String
Link copied to clipboard
private val MAX_VALUE: Int = 1000
Link copied to clipboard
Link copied to clipboard
val start: Long
Link copied to clipboard
private val TAG: String
Link copied to clipboard
private open var timeKeeper: TimeKeeper
Link copied to clipboard
val until: Long

Functions

Link copied to clipboard
Gets the code which is currently active.
Link copied to clipboard
open fun getProgress(): Int
Get the current percent progress of the code for TOTPMechanism.
Link copied to clipboard
open fun isValid(): Boolean
Indicates whether the current OathTokenCode is valid or not.
Link copied to clipboard
open fun toJson(): String
Creates a JSON string representation of OathTokenCode object.