TwilioVerify

Describes the available operations to proccess Factors and Challenges
interface TwilioVerify

Types

Builder
Link copied to clipboard
Builder class that builds an instance of TwilioVerifyManager, which handles all the operations regarding Factors and Challenges
class Builder(context: Context)

Functions

clearLocalStorage
Link copied to clipboard
Clears local storage, it will delete factors and key pairs in this device. Note: Calling this method will not delete factors in Verify Push API, so you need to delete them from your backend to prevent invalid/deleted factors when getting factors for an identity.
abstract fun clearLocalStorage(then: () -> Unit)
createFactor
Link copied to clipboard
Creates a Factor from a FactorPayload
abstract fun createFactor(factorPayload: FactorPayload, success: (Factor) -> Unit, error: (TwilioVerifyException) -> Unit)
deleteFactor
Link copied to clipboard
Deletes a Factor with the given sid. This method calls Verify Push API to delete the factor and will remove the factor from local storage if the API call succeeds.
abstract fun deleteFactor(factorSid: String, success: () -> Unit, error: (TwilioVerifyException) -> Unit)
equals
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
getAllChallenges
Link copied to clipboard
Gets all Challenges associated to a Factor with the given ChallengeListPayload
abstract fun getAllChallenges(challengeListPayload: ChallengeListPayload, success: (ChallengeList) -> Unit, error: (TwilioVerifyException) -> Unit)
getAllFactors
Link copied to clipboard
Gets all Factors created by the app, this method will return the factors in local storage.
abstract fun getAllFactors(success: (List<Factor>) -> Unit, error: (TwilioVerifyException) -> Unit)
getChallenge
Link copied to clipboard
Gets a Challenge with the given challenge sid and factor sid
abstract fun getChallenge(challengeSid: String, factorSid: String, success: (Challenge) -> Unit, error: (TwilioVerifyException) -> Unit)
hashCode
Link copied to clipboard
open override fun hashCode(): Int
toString
Link copied to clipboard
open override fun toString(): String
updateChallenge
Link copied to clipboard
Updates a Challenge from a UpdateChallengePayload
abstract fun updateChallenge(updateChallengePayload: UpdateChallengePayload, success: () -> Unit, error: (TwilioVerifyException) -> Unit)
updateFactor
Link copied to clipboard
Updates a Factor from a UpdateFactorPayload
abstract fun updateFactor(updateFactorPayload: UpdateFactorPayload, success: (Factor) -> Unit, error: (TwilioVerifyException) -> Unit)
verifyFactor
Link copied to clipboard
Verifies a Factor from a VerifyFactorPayload
abstract fun verifyFactor(verifyFactorPayload: VerifyFactorPayload, success: (Factor) -> Unit, error: (TwilioVerifyException) -> Unit)