HttpChallengeEntryPoint
The entry point for stateless (token/Basic) firewalls: a 401 RFC 9457 Problem Details body plus a WWW-Authenticate challenge, matching Quiote\Mcp\Middleware\McpAuthMiddleware’s existing shape so API clients see one consistent failure format across the framework.
Synopsis
Section titled “Synopsis”final class HttpChallengeEntryPoint implements EntryPointInterface
| Implements | EntryPointInterface |
| Since | 1.0.0 |
| Source | EntryPoint/HttpChallengeEntryPoint.php |
Constructor
Section titled “Constructor”__construct()
Section titled “__construct()”public function __construct(string $scheme = 'Bearer', ?string $realm = null): mixed
An optional realm parameter to include in the challenge.
| Parameter | Type | Description |
|---|---|---|
$scheme | string | The WWW-Authenticate scheme (e.g. Bearer, Basic). |
$realm | ?``string | An optional realm parameter to include in the challenge. |
Returns mixed
Methods
Section titled “Methods”| Method | Description |
|---|---|
start(ServerRequestInterface $request, AuthenticationException $exception): ResponseInterface |
start()
Section titled “start()”public function start(ServerRequestInterface $request, AuthenticationException $exception): ResponseInterface
The exception the failing authenticator threw.
| Parameter | Type | Description |
|---|---|---|
$request | ServerRequestInterface | The request that failed authentication. |
$exception | AuthenticationException | The exception the failing authenticator threw. |
Returns ResponseInterface — A 401 response with a WWW-Authenticate header and an RFC 9457 Problem Details body.