TokenQuery
in package
implements
JsonSerializable
uses
JsonSerializableTrait
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`.
- $codeVerifier : string|null
- The PKCE code verifier matching the `code_challenge` sent with the authorization request. Required when the authorization request included a `code_challenge`. Must be sent in the request body.
- $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>|stdClass
- 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
$codeVerifier
The PKCE code verifier matching the `code_challenge` sent with the authorization request. Required when the authorization request included a `code_challenge`. Must be sent in the request body.
public
string|null
$codeVerifier
= null
$grantType
The grant type for the token request.
public
SSOGrantType
$grantType
$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 $codeVerifier = 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
- $codeVerifier : 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
selfjsonSerialize()
public
jsonSerialize() : array<string|int, mixed>|stdClass
Return values
array<string|int, mixed>|stdClasstoArray()
public
toArray() : array<string|int, mixed>