AuthenticationFactor
in package
implements
JsonSerializable
uses
JsonSerializableTrait
Read onlyYes
Table of Contents
Interfaces
- JsonSerializable
Properties
- $createdAt : DateTimeImmutable
- An ISO 8601 timestamp.
- $id : string
- The unique ID of the factor.
- $object : string
- Distinguishes the authentication factor object.
- $sms : AuthenticationFactorSms|null
- SMS-based authentication factor details.
- $totp : AuthenticationFactorTotp|null
- TOTP-based authentication factor details.
- $type : AuthenticationFactorType
- The type of the factor to enroll.
- $updatedAt : DateTimeImmutable
- An ISO 8601 timestamp.
- $userId : string|null
- The ID of the [user](https://workos.com/docs/reference/authkit/user).
Methods
- __construct() : mixed
- fromArray() : self
- jsonSerialize() : array<string|int, mixed>
- toArray() : array<string|int, mixed>
Properties
$createdAt
An ISO 8601 timestamp.
public
DateTimeImmutable
$createdAt
$id
The unique ID of the factor.
public
string
$id
$object
Distinguishes the authentication factor object.
public
string
$object
$sms
SMS-based authentication factor details.
public
AuthenticationFactorSms|null
$sms
= null
$totp
TOTP-based authentication factor details.
public
AuthenticationFactorTotp|null
$totp
= null
$type
The type of the factor to enroll.
public
AuthenticationFactorType
$type
$updatedAt
An ISO 8601 timestamp.
public
DateTimeImmutable
$updatedAt
$userId
The ID of the [user](https://workos.com/docs/reference/authkit/user).
public
string|null
$userId
= null
Methods
__construct()
public
__construct(string $object, string $id, AuthenticationFactorType $type, DateTimeImmutable $createdAt, DateTimeImmutable $updatedAt[, string|null $userId = null ][, AuthenticationFactorSms|null $sms = null ][, AuthenticationFactorTotp|null $totp = null ]) : mixed
Parameters
- $object : string
- $id : string
- $type : AuthenticationFactorType
- $createdAt : DateTimeImmutable
- $updatedAt : DateTimeImmutable
- $userId : string|null = null
- $sms : AuthenticationFactorSms|null = null
- $totp : AuthenticationFactorTotp|null = null
fromArray()
public
static fromArray(array<string|int, mixed> $data) : self
Parameters
- $data : array<string|int, mixed>
Return values
selfjsonSerialize()
public
jsonSerialize() : array<string|int, mixed>
Return values
array<string|int, mixed>toArray()
public
toArray() : array<string|int, mixed>