WorkOS PHP SDK

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

$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
self

jsonSerialize()

public jsonSerialize() : array<string|int, mixed>
Return values
array<string|int, mixed>

toArray()

public toArray() : array<string|int, mixed>
Return values
array<string|int, mixed>

        
On this page

Search results