Skip to content

OidcAuthorizationState

The per-attempt secrets an OIDC auth-code + PKCE flow must round-trip through the user’s session between the authorization redirect and the callback: the CSRF-style state, the PKCE code_verifier, and the OIDC nonce (replay/injection protection for the ID token).

final class OidcAuthorizationState

Since1.0.0
SourceOidcAuthorizationState.php

public function __construct(string $state, string $pkceVerifier, string $nonce): mixed

The OIDC nonce sent in the authorization request, expected back in the ID token.

ParameterTypeDescription
$statestringThe CSRF-style state value sent to and echoed back by the authorization server.
$pkceVerifierstringThe PKCE code_verifier (S256 challenge was derived from this).
$noncestringThe OIDC nonce sent in the authorization request, expected back in the ID token.

Returns mixed

MethodDescription
getNonce(): string
getPkceVerifier(): string
getState(): string

public function getNonce(): string

Returns string — The OIDC nonce.

public function getPkceVerifier(): string

Returns string — The PKCE code_verifier.

public function getState(): string

Returns string — The state value.