Debian Codegraph @

lib/3rdParty/composer/facile-it/php-openid-client/src/AuthMethod/AbstractTLS.php

raw symbols SCIP
1 <?php
2
3 declare(strict_types=1);
4
5 namespace Facile\OpenIDClient\AuthMethod;
6
7 use Facile\OpenIDClient\Client\ClientInterface as OpenIDClient;
8 use Psr\Http\Message\RequestInterface;
9 use Override;
10
11 use function array_merge;
12 use function http_build_query;
13
14 abstract class AbstractTLS implements AuthMethodInterface
15 {
16 #[Override]
17 public function createRequest(
18 RequestInterface $request,
19 OpenIDClient $client,
20 array $claims
21 ): RequestInterface {
22 $clientId = $client->getMetadata()->getClientId();
23
24 $claims = array_merge($claims, [
25 'client_id' => $clientId,
26 ]);
27
28 $request->getBody()->write(http_build_query($claims));
29
30 return $request;
31 }
32 }