WorkOS PHP SDK

MagicAuth
in package
implements JsonSerializable uses JsonSerializableTrait

Read onlyYes

Table of Contents

Interfaces

JsonSerializable

Properties

$code  : string
The code used to verify the Magic Auth code.
$createdAt  : DateTimeImmutable
An ISO 8601 timestamp.
$email  : string
The email address of the user.
$expiresAt  : DateTimeImmutable
The timestamp when the Magic Auth code expires.
$id  : string
The unique ID of the Magic Auth code.
$object  : string
Distinguishes the Magic Auth object.
$updatedAt  : DateTimeImmutable
An ISO 8601 timestamp.
$userId  : string
The unique ID of the user.

Methods

__construct()  : mixed
fromArray()  : self
jsonSerialize()  : array<string|int, mixed>
toArray()  : array<string|int, mixed>

Properties

$code

The code used to verify the Magic Auth code.

public string $code

$createdAt

An ISO 8601 timestamp.

public DateTimeImmutable $createdAt

$email

The email address of the user.

public string $email

$expiresAt

The timestamp when the Magic Auth code expires.

public DateTimeImmutable $expiresAt

$id

The unique ID of the Magic Auth code.

public string $id

$object

Distinguishes the Magic Auth object.

public string $object

$updatedAt

An ISO 8601 timestamp.

public DateTimeImmutable $updatedAt

$userId

The unique ID of the user.

public string $userId

Methods

__construct()

public __construct(string $object, string $id, string $userId, string $email, DateTimeImmutable $expiresAt, DateTimeImmutable $createdAt, DateTimeImmutable $updatedAt, string $code) : mixed
Parameters
$object : string
$id : string
$userId : string
$email : string
$expiresAt : DateTimeImmutable
$createdAt : DateTimeImmutable
$updatedAt : DateTimeImmutable
$code : string

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