MCP PHP SDK

ProtectedResourceMetadataMiddleware implements MiddlewareInterface

FinalYes

Serves OAuth 2.0 Protected Resource Metadata (RFC 9728) at well-known endpoints.

This is a thin path-guard adapter: it decides when the metadata endpoint applies (a GET to one of the configured well-known paths) and delegates the what to ProtectedResourceMetadataHandler, the reusable request handler that can also be mounted directly as a framework controller.

Tags
see
https://datatracker.ietf.org/doc/html/rfc9728
author

Volodymyr Panivko sveneld300@gmail.com

Table of Contents

Interfaces

MiddlewareInterface

Properties

$metadata  : ProtectedResourceMetadata
$metadataHandler  : ProtectedResourceMetadataHandler

Methods

__construct()  : mixed
process()  : ResponseInterface
isMetadataRequest()  : bool

Properties

Methods

process()

public process(ServerRequestInterface $request, RequestHandlerInterface $handler) : ResponseInterface
Parameters
$request : ServerRequestInterface
$handler : RequestHandlerInterface
Return values
ResponseInterface

isMetadataRequest()

private isMetadataRequest(ServerRequestInterface $request) : bool
Parameters
$request : ServerRequestInterface
Return values
bool
On this page

Search results