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:----J/VwneursdKF8bcMURRm2XFzo5RxD8cBhLHlueZJZa2AmoG+eL2cc2DlOyDcfBjyUyAJpes6a4nvKH1u7x5xYNIm9m3Br5fQNW6NqXMwm0DdxEQDj6jBEZIir55DiIhMCPO4DvSJ+9g+AnR1UZ+r17LmOCy1qpSrL0bSfz6HgH/rn9n6rmc7ZGjNUM6qxMrYKaCNI+LTvsDwIWRVCeC0X0mI72bARTum5PBtpt/16Gs7voyf2P/1w1C+vT3lNDgWv0QxV2OmQXFlhXwfp95czzon2WBvyDKq3EgFofMzL925jqGWvL04VQujh4ISWFyUVmVcLvnBZVaTWDgO6Z+3Kak6SON/BgFTn4zUbzoMiwbwzdco/+EdYHEoJbl3kjcLMlU/YUAjM9lO8VyYLWODNJpZz8hUpqPMDU3KPtc0x7yjggqN2L4JcxQuBaAtnUDW5wN/er84TEpluuZrjupy5pcYfEmJX+Untk//FA6IE6ul0jGyOe+8T7rbs8bqQeLyViy+uJyljsLOA7BeIxR+1F99N/97A9uQdgBqr9Vw/VQ5GOr0S9WrIJEt44Qca8HJJJK92u4kmiLcDxHfaPATIOjgf1VqbNCNEv3vyAgJyTxm0hzIafsi7UuIV377XyqZOsgzqXJ7vM/5gnFXr/GCv0VgVheDRScU3V84lRFGd1A=----ATTACHMENT:----MTk4OTc1MDYyOTMxMjYwNSA2ODcyNDI1ODI0MTA0MTI3IDU3OTAxOTUzODM2MzAzMjE=