for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace TMV\OpenIdClient\Middleware;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Server\MiddlewareInterface;
use Psr\Http\Server\RequestHandlerInterface;
use TMV\OpenIdClient\ClientInterface;
class ClientProviderMiddleware implements MiddlewareInterface
{
/** @var ClientInterface */
private $client;
public function __construct(ClientInterface $client)
$this->client = $client;
}
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
return $handler->handle($request->withAttribute(ClientInterface::class, $this->client));