McpAuthenticatorInterface
Validates the bearer token presented to the MCP HTTP endpoint.
Bind a different implementation via PluginRegistrar::service(McpAuthenticatorInterface::class, ...) to delegate to an app’s own credential store instead of the static-token default (StaticTokenAuthenticator).
Synopsis
Section titled “Synopsis”interface McpAuthenticatorInterface
| Implemented by | StaticTokenAuthenticator |
| Source | Auth/McpAuthenticatorInterface.php |
Methods
Section titled “Methods”| Method | Description |
|---|---|
authenticate(string $token): bool |
authenticate()
Section titled “authenticate()”abstract public function authenticate(string $token): bool
| Parameter | Type | Description |
|---|---|---|
$token | string |
Returns bool — whether $token is valid