Inttegro.Otp.VerifyRequest (inttegro v0.2.0)

Copy Markdown View Source

Parameters for Verify Request in the Otp API.

Build this struct with new!/1 and pass it to the corresponding function on Inttegro.Otp. Required keys are enforced immediately; optional values left as nil are omitted from the request sent to Inttegro.

Initiates, verifies, and inspects one-time passcode transactions.

OTP delivery and verification are separate steps. Initiation returning successfully means the transaction was accepted, not that the recipient received or verified the code. Keep the returned transaction ID and submit the user-provided code through verify/3.

Summary

Types

t()

A validated verify request request.

Functions

Builds a Inttegro.Otp.VerifyRequest and raises KeyError when a required field is missing.

Types

t()

@type t() :: %Inttegro.Otp.VerifyRequest{
  recipient: String.t(),
  token: String.t(),
  transaction_id: String.t()
}

A validated verify request request.

Functions

new!(attrs \\ %{})

@spec new!(map() | keyword()) :: t()

Builds a Inttegro.Otp.VerifyRequest and raises KeyError when a required field is missing.