TOTP
interface TOTP
Types
Link copied to clipboard
data class AuthenticateParameters(val totpCode: String, val sessionDurationMinutes: UInt = Constants.DEFAULT_SESSION_TIME_MINUTES)
A data class wrapping the parameters use in a TOTP authenticate request
Link copied to clipboard
A data class wrapping the parameters used in a TOTP create request
Link copied to clipboard
data class RecoverParameters(val recoveryCode: String, val sessionDurationMinutes: UInt = Constants.DEFAULT_SESSION_TIME_MINUTES)
A data class wrapping the parameters use in a TOTP recover request
Functions
Link copied to clipboard
abstract suspend fun authenticate(parameters: TOTP.AuthenticateParameters): TOTPAuthenticateResponse
abstract fun authenticate(parameters: TOTP.AuthenticateParameters, callback: (TOTPAuthenticateResponse) -> Unit)
Call this method to authenticate a TOTP code entered by a user. If this method succeeds, the user will be logged in and granted an active session
Link copied to clipboard
Call this method to create a new TOTP instance for a user. The user can use the authenticator application of their choice to scan the QR code or enter the secret.
Link copied to clipboard
Call this method to authenticate a recovery code for a TOTP instance. If this method succeeds, the user will be logged in and granted an active session
Link copied to clipboard
Call this method to retrieve the recovery codes for a TOTP instance tied to a user.