WorkOS PHP SDK

TokenQuery
in package
implements JsonSerializable uses JsonSerializableTrait

Read onlyYes

Table of Contents

Interfaces

JsonSerializable

Properties

$clientId  : string
The client ID of the WorkOS environment.
$clientSecret  : string
The client secret of the WorkOS environment.
$code  : string|null
The authorization code received from the authorization callback. Required when `grant_type` is `authorization_code`.
$grantType  : SSOGrantType
The grant type for the token request.
$organizationId  : string|null
The ID of the organization whose connection the subject token is validated against. Required when `grant_type` is `urn:ietf:params:oauth:grant-type:token-exchange`. Must be sent in the request body.
$subjectToken  : string|null
The OIDC ID token to exchange. Required when `grant_type` is `urn:ietf:params:oauth:grant-type:token-exchange`. Must be sent in the request body.
$subjectTokenType  : string|null
The type of the subject token. Required when `grant_type` is `urn:ietf:params:oauth:grant-type:token-exchange`. Must be sent in the request body.

Methods

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

Properties

$clientId

The client ID of the WorkOS environment.

public string $clientId

$clientSecret

The client secret of the WorkOS environment.

public string $clientSecret

$code

The authorization code received from the authorization callback. Required when `grant_type` is `authorization_code`.

public string|null $code = null

$organizationId

The ID of the organization whose connection the subject token is validated against. Required when `grant_type` is `urn:ietf:params:oauth:grant-type:token-exchange`. Must be sent in the request body.

public string|null $organizationId = null

$subjectToken

The OIDC ID token to exchange. Required when `grant_type` is `urn:ietf:params:oauth:grant-type:token-exchange`. Must be sent in the request body.

public string|null $subjectToken = null

$subjectTokenType

The type of the subject token. Required when `grant_type` is `urn:ietf:params:oauth:grant-type:token-exchange`. Must be sent in the request body.

public string|null $subjectTokenType = null

Methods

__construct()

public __construct(string $clientId, string $clientSecret, SSOGrantType $grantType[, string|null $code = null ][, string|null $subjectToken = null ][, string|null $subjectTokenType = null ][, string|null $organizationId = null ]) : mixed
Parameters
$clientId : string
$clientSecret : string
$grantType : SSOGrantType
$code : string|null = null
$subjectToken : string|null = null
$subjectTokenType : string|null = null
$organizationId : string|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