ProtectedResourceMetadataMiddleware implements MiddlewareInterface
FinalYes
Serves OAuth 2.0 Protected Resource Metadata (RFC 9728) at its well-known path.
This is a thin path-guard adapter: it decides when the metadata endpoint applies (a GET to the metadata path derived from the resource identifier) and delegates the what to ProtectedResourceMetadataHandler, the reusable request handler that can also be mounted directly as a framework controller.
Tags
Table of Contents
Interfaces
- MiddlewareInterface
Properties
Methods
- __construct() : mixed
- process() : ResponseInterface
- isMetadataRequest() : bool
Properties
$metadata read-only
private
ProtectedResourceMetadata
$metadata
$metadataHandler
private
ProtectedResourceMetadataHandler
$metadataHandler
Methods
__construct()
public
__construct(ProtectedResourceMetadata $metadata[, ResponseFactoryInterface|null $responseFactory = null ][, StreamFactoryInterface|null $streamFactory = null ]) : mixed
Parameters
- $metadata : ProtectedResourceMetadata
- $responseFactory : ResponseFactoryInterface|null = null
- $streamFactory : StreamFactoryInterface|null = null
process()
public
process(ServerRequestInterface $request, RequestHandlerInterface $handler) : ResponseInterface
Parameters
- $request : ServerRequestInterface
- $handler : RequestHandlerInterface
Return values
ResponseInterfaceisMetadataRequest()
private
isMetadataRequest(ServerRequestInterface $request) : bool
Parameters
- $request : ServerRequestInterface