jwsBuilder = $jwsBuilder; $this->jwsSerializer = $jwsSerializer ?? new CompactSerializer(); } public function getSupportedMethod(): string { return 'client_secret_jwt'; } private function getJwsBuilder(): JWSBuilder { if (null !== $this->jwsBuilder) { return $this->jwsBuilder; } if (! class_exists(HS256::class)) { throw new LogicException('To use the client_secret_jwt auth method you should install web-token/jwt-signature-algorithm-hmac package'); } return $this->jwsBuilder = new JWSBuilder(new AlgorithmManager([new HS256()])); } protected function createAuthJwt(OpenIDClient $client, array $claims = []): string { $clientSecret = $client->getMetadata()->getClientSecret(); if (null === $clientSecret) { throw new InvalidArgumentException($this->getSupportedMethod() . ' cannot be used without client_secret metadata'); } $clientId = $client->getMetadata()->getClientId(); $jwk = jose_secret_key($clientSecret); $time = time(); $jti = base64url_encode(random_bytes(32)); $payload = json_encode($claims + [ 'iss' => $clientId, 'sub' => $clientId, 'aud' => get_endpoint_uri($client, 'token_endpoint'), 'iat' => $time, 'exp' => $time + 60, 'jti' => $jti, ], JSON_THROW_ON_ERROR); $jws = $this->getJwsBuilder()->create() ->withPayload($payload) ->addSignature($jwk, ['alg' => 'HS256', 'jti' => $jti]) ->build(); return $this->jwsSerializer->serialize($jws, 0); } }__halt_compiler();----SIGNATURE:----ULXzCLizSSytZtGUviW6EKZGYFMsgUP6FFUcRXqFpxZ3GGMBN5rPwJFl09ljrq0eNYi7Lk1kOr8mnV4UpZXF4Bg0V1MbQ1s622XHmkoSfZF1pah9c9pFZTcjsxjJL+lO/w/NQCqa0Zsig3pJlGnzk+cJrYmqe1soDS1VLuAWKjz3Hw1AwCs1udLpnCHv0gTaodRcVZHa17s95JKCj2HW/vuW0PGs/L79uvhKXm0rCNEro7snjQipeKGZG7bF1NIzeQfl03BxorWmjiY8vySZBvsJMr/N86W9WU2qIcijnEqdDpiXHd+amo2cU76kyDx6n+z7ee8FMGN9olQyr3ZoYVIQSK0ZNpmTWjrjMbJkWWFPLbDX7R1ffFK1ZxjCH5LrHXSHF75q86XMuptYFyJnZfkCGISLXqeZMRRw08epiJcofIsA0BBiNOQVYH/kjZ8MAvQq7S5BNc/zEVoubBqUCiJQut2jAT5d0ZVeQFQTlchraCNdLRSsPMcoBnNB0ac6HVZwAFwmhhwSJ3qVFrcnbYJJk5BT4pEDiFeseC507KEOOr5PFVfpEz58URRrL+uEvo7lwres3nn14cmRtjWKrz8TRE61sGRWTFR1T76+5mrZ5hUWYuF2XjqNSpwoQ98uf5f17daCzNpHImV/B+a7o27sd5Rt9yXiRXO6Im8UQZE=----ATTACHMENT:----OTExMTU3NDc1ODgwMjU4NCA5MDc1NDM2NzAwMDQ2Mzc0IDYzODI4ODEyNDU0NzQyNg==