OTP

interface OTP

OTP interface that encompasses authentication functions as well as other related functionality

Types

Link copied to clipboard
data class AuthParameters(    val token: String,     val methodId: String,     val sessionDurationMinutes: UInt = DEFAULT_SESSION_TIME_MINUTES)

Data class used for wrapping parameters used with OTP authentication

Link copied to clipboard
interface EmailOTP

Provides all possible ways to call Email OTP endpoints

Link copied to clipboard
interface SmsOTP

Provides all possible ways to call SMS OTP endpoints

Link copied to clipboard
interface WhatsAppOTP

Provides all possible ways to call WhatsApp OTP endpoints

Functions

Link copied to clipboard
abstract suspend fun authenticate(parameters: OTP.AuthParameters): AuthResponse
abstract fun authenticate(parameters: OTP.AuthParameters, callback: (AuthResponse) -> Unit)

Wraps the OTP authenticate API endpoint which validates the OTP token passed in. If this method succeeds, the user will be logged in, granted an active session

Properties

Link copied to clipboard
abstract val email: OTP.EmailOTP

Public variable that exposes an instance of Email OTP

Link copied to clipboard
abstract val sms: OTP.SmsOTP

Public variable that exposes an instance of SMS OTP

Link copied to clipboard
abstract val whatsapp: OTP.WhatsAppOTP

Public variable that exposes an instance of WhatsApp OTP