-
-
Notifications
You must be signed in to change notification settings - Fork 0
BearerCredential
github-actions edited this page Mar 29, 2026
·
1 revision
Class BearerCredential.
Represents the parsed credential for HTTP Bearer Token Authentication. Bearer tokens MUST be treated as opaque secrets that grant access to the associated protected resource. Any party in possession of the token MAY use it, therefore implementations MUST ensure the token is never exposed in logs, stack traces, debug output, or error messages.
This credential SHALL be produced by the Bearer authentication parser in
- See: \FastForward\Http\Message\Header\Authorization\FastForward\Http\Message\Header\Authorization::parse() when a valid Bearer token is provided by the client.
- Full name:
\FastForward\Http\Message\Header\Authorization\BearerCredential - This class is marked as final and can't be subclassed
- This class implements:
\FastForward\Http\Message\Header\Authorization\AuthorizationCredential - This class is a Final class
public string $tokenCreates a new Bearer token credential instance.
public __construct(string $token): mixedThe token parameter is marked with #[\SensitiveParameter] because it
MUST be handled as a private security secret; leaking its value may
allow unauthorized access to the protected system.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$token |
string | the opaque bearer token provided by the client |