Skip to content
docsv0.1.0

AuthState

The outcome of authenticating a request, carried by an {@see AuthContext}. `Anonymous` means no credential was presented; `Authenticated` means one was presented and verified into an {@see Actor}; `Invalid` means one was presented and rejected. The three are distinct on purpose — "no credential" and "a bad credential" are different facts, and fail-closed policy must be able to tell them apart rather than collapsing both into "not authenticated".

AuthState::cases()

public static function cases(): array

AuthState::from()

public static function from(string|int $value): static

Parameters

Parameters of from()
NameTypeDescription
$valuestring|int

AuthState::tryFrom()

public static function tryFrom(string|int $value): ?static

Parameters

Parameters of tryFrom()
NameTypeDescription
$valuestring|int