Skip to content
docsv0.1.0

CredentialType

How a {@see Credential} arrived — the closed set of transports the framework recognises. A `Bearer` credential is the `Authorization: Bearer …` token; a `Cookie` credential is the session-cookie value. The set is deliberately closed (a vocabulary, not free-form metadata), consistent with {@see ActorType}: a credential's kind is identity, not a string a caller can invent.

CredentialType::cases()

public static function cases(): array

CredentialType::from()

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

Parameters

Parameters of from()
NameTypeDescription
$valuestring|int

CredentialType::tryFrom()

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

Parameters

Parameters of tryFrom()
NameTypeDescription
$valuestring|int