Skip to content

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.

Properties

token

public string $token

Methods

__construct

Creates a new Bearer token credential instance.

public __construct(string $token): mixed

The 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

Clone this wiki locally