AXIAM PHP SDK

OidcLoginOutcome
in package

FinalYes

What a login/callback handler should do next — one shape per outcome kind. Framework controllers ({@see \Axiam\Sdk\Laravel\OidcLoginController}/`OidcCallbackController`, {@see \Axiam\Sdk\Symfony\OidcLoginController}/`OidcCallbackController`) translate this into their own framework's redirect/JSON response and add nothing of their own, so Laravel and Symfony cannot drift (mirrors the TypeScript reference's `OidcLoginOutcome` discriminated union).

Table of Contents

Constants

KIND_ERROR  : mixed = 'error'
KIND_JSON  : mixed = 'json'
KIND_REDIRECT  : mixed = 'redirect'

Properties

$authenticated  : bool|null
$error  : string|null
$expiresIn  : int|null
$kind  : string
$message  : string|null
$redirectUrl  : string|null
$status  : int|null
$sub  : string|null

Methods

error()  : self
Reply `$status` with the standardized `{error, message}` body (§10/§11 shape).
errorBody()  : array{error: string, message: string}
json()  : self
Reply `200` with a token-free login summary — the fallback when no post-login redirect is configured.
jsonBody()  : array{authenticated: true, sub?: string, expiresIn: int}
redirect()  : self
Send a 302 to `$url` — the IdP authorization URL, or the post-login destination.

Constants

Properties

Methods

error()

Reply `$status` with the standardized `{error, message}` body (§10/§11 shape).

public static error(int $status, string $error, string $message) : self
Parameters
$status : int
$error : string
$message : string
Return values
self

errorBody()

public errorBody() : array{error: string, message: string}
Return values
array{error: string, message: string}

json()

Reply `200` with a token-free login summary — the fallback when no post-login redirect is configured.

public static json(string|null $sub, int $expiresIn) : self
Parameters
$sub : string|null
$expiresIn : int
Return values
self

jsonBody()

public jsonBody() : array{authenticated: true, sub?: string, expiresIn: int}
Return values
array{authenticated: true, sub?: string, expiresIn: int}

redirect()

Send a 302 to `$url` — the IdP authorization URL, or the post-login destination.

public static redirect(string $url) : self
Parameters
$url : string
Return values
self
On this page

Search results