WorkOS PHP SDK

CreateConnectionOIDCOptions
in package
implements JsonSerializable uses JsonSerializableTrait

Read onlyYes

Table of Contents

Interfaces

JsonSerializable

Properties

$clientId  : string
The OIDC client ID.
$clientSecret  : string|null
The OIDC client secret. Required for `client_secret_basic` and `client_secret_post`, and rejected for `private_key_jwt`, which authenticates with a key pair instead. This value is write-only and is never returned.
$discoveryEndpoint  : string
The OIDC discovery endpoint.
$fetchUserInfo  : bool|null
Whether to fetch additional profile attributes from the userinfo endpoint.
$idTokenSignatureAlgorithm  : PatchConnectionOIDCOptionsIdTokenSignatureAlgorithm|null
The ID-token signing algorithm.
$jwtSigningKeyPair  : CreateConnectionKeyPair|null
A key pair for WorkOS to sign `private_key_jwt` client assertions with. Only accepted when `token_authentication_method` is `private_key_jwt`; when omitted, WorkOS generates one and returns its certificate in `oidc_options.jwt_signing_certs`.
$pkce  : bool|null
Whether PKCE is enabled for the connection.
$redirectUri  : string|null
A custom OAuth callback URL override. When omitted, the standard WorkOS-generated redirect URI is used.
$tokenAuthenticationMethod  : PatchConnectionOIDCOptionsTokenAuthenticationMethod|null
The token-endpoint client authentication method.

Methods

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

Properties

$clientSecret

The OIDC client secret. Required for `client_secret_basic` and `client_secret_post`, and rejected for `private_key_jwt`, which authenticates with a key pair instead. This value is write-only and is never returned.

public string|null $clientSecret = null

$fetchUserInfo

Whether to fetch additional profile attributes from the userinfo endpoint.

public bool|null $fetchUserInfo = null

$jwtSigningKeyPair

A key pair for WorkOS to sign `private_key_jwt` client assertions with. Only accepted when `token_authentication_method` is `private_key_jwt`; when omitted, WorkOS generates one and returns its certificate in `oidc_options.jwt_signing_certs`.

public CreateConnectionKeyPair|null $jwtSigningKeyPair = null

$redirectUri

A custom OAuth callback URL override. When omitted, the standard WorkOS-generated redirect URI is used.

public string|null $redirectUri = null

Methods

__construct()

public __construct(string $discoveryEndpoint, string $clientId[, string|null $clientSecret = null ][, string|null $redirectUri = null ][, bool|null $pkce = null ][, PatchConnectionOIDCOptionsTokenAuthenticationMethod|null $tokenAuthenticationMethod = null ][, CreateConnectionKeyPair|null $jwtSigningKeyPair = null ][, PatchConnectionOIDCOptionsIdTokenSignatureAlgorithm|null $idTokenSignatureAlgorithm = null ][, bool|null $fetchUserInfo = null ]) : mixed
Parameters
$discoveryEndpoint : string
$clientId : string
$clientSecret : string|null = null
$redirectUri : string|null = null
$pkce : bool|null = null
$tokenAuthenticationMethod : PatchConnectionOIDCOptionsTokenAuthenticationMethod|null = null
$jwtSigningKeyPair : CreateConnectionKeyPair|null = null
$idTokenSignatureAlgorithm : PatchConnectionOIDCOptionsIdTokenSignatureAlgorithm|null = null
$fetchUserInfo : bool|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>
On this page

Search results