WorkOS PHP SDK

ApiKeyWithValue
in package
implements JsonSerializable uses JsonSerializableTrait

Read onlyYes

Table of Contents

Interfaces

JsonSerializable

Properties

$createdAt  : DateTimeImmutable
An ISO 8601 timestamp.
$id  : string
Unique identifier of the API Key.
$lastUsedAt  : DateTimeImmutable|null
Timestamp of when the API Key was last used.
$name  : string
A descriptive name for the API Key.
$obfuscatedValue  : string
An obfuscated representation of the API Key value.
$object  : string
Distinguishes the API Key object.
$owner  : ApiKeyWithValueOwner
The entity that owns the API Key.
$permissions  : array<string|int, string>
The permission slugs assigned to the API Key.
$updatedAt  : DateTimeImmutable
An ISO 8601 timestamp.
$value  : string
The full API Key value. Only returned once at creation time.

Methods

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

Properties

$createdAt

An ISO 8601 timestamp.

public DateTimeImmutable $createdAt

$lastUsedAt

Timestamp of when the API Key was last used.

public DateTimeImmutable|null $lastUsedAt

$obfuscatedValue

An obfuscated representation of the API Key value.

public string $obfuscatedValue

$permissions

The permission slugs assigned to the API Key.

public array<string|int, string> $permissions

$updatedAt

An ISO 8601 timestamp.

public DateTimeImmutable $updatedAt

$value

The full API Key value. Only returned once at creation time.

public string $value

Methods

__construct()

public __construct(string $object, string $id, ApiKeyWithValueOwner $owner, string $name, string $obfuscatedValue, DateTimeImmutable|null $lastUsedAt, array<string|int, mixed> $permissions, DateTimeImmutable $createdAt, DateTimeImmutable $updatedAt, string $value) : mixed
Parameters
$object : string
$id : string
$owner : ApiKeyWithValueOwner
$name : string
$obfuscatedValue : string
$lastUsedAt : DateTimeImmutable|null
$permissions : array<string|int, mixed>
$createdAt : DateTimeImmutable
$updatedAt : DateTimeImmutable
$value : 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