@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | ? $metadata->getUserinfoSignedResponseAlg() |
| 86 | 86 | : $metadata->getIdTokenSignedResponseAlg(); |
| 87 | 87 | |
| 88 | - if (! $expectedAlg) { |
|
| 88 | + if (!$expectedAlg) { |
|
| 89 | 89 | throw new RuntimeException('Unable to verify id_token without an alg value'); |
| 90 | 90 | } |
| 91 | 91 | |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | |
| 98 | 98 | $payload = \json_decode(base64url_decode(\explode('.', $idToken)[1] ?? '{}'), true); |
| 99 | 99 | |
| 100 | - if (! \is_array($payload)) { |
|
| 100 | + if (!\is_array($payload)) { |
|
| 101 | 101 | throw new InvalidArgumentException('Unable to decode token payload'); |
| 102 | 102 | } |
| 103 | 103 | |
@@ -122,7 +122,7 @@ discard block |
||
| 122 | 122 | |
| 123 | 123 | $requiredClaims = []; |
| 124 | 124 | |
| 125 | - if (! $fromUserInfo) { |
|
| 125 | + if (!$fromUserInfo) { |
|
| 126 | 126 | $requiredClaims = ['iss', 'sub', 'aud', 'exp', 'iat']; |
| 127 | 127 | } |
| 128 | 128 | |
@@ -150,7 +150,7 @@ discard block |
||
| 150 | 150 | |
| 151 | 151 | $jwks = $this->getSigningJWKSet($client, $expectedAlg, $kid); |
| 152 | 152 | |
| 153 | - if (! $jwsVerifier->verifyWithKeySet($jws, $jwks, 0)) { |
|
| 153 | + if (!$jwsVerifier->verifyWithKeySet($jws, $jwks, 0)) { |
|
| 154 | 154 | throw new InvalidArgumentException('Failed to validate JWT signature'); |
| 155 | 155 | } |
| 156 | 156 | |
@@ -171,7 +171,7 @@ discard block |
||
| 171 | 171 | |
| 172 | 172 | $clientSecret = $metadata->getClientSecret(); |
| 173 | 173 | |
| 174 | - if (! $clientSecret) { |
|
| 174 | + if (!$clientSecret) { |
|
| 175 | 175 | throw new RuntimeException('Unable to verify token without client_secret'); |
| 176 | 176 | } |
| 177 | 177 | |
@@ -184,12 +184,12 @@ discard block |
||
| 184 | 184 | |
| 185 | 185 | $jwk = $jwks->selectKey('sig', null, ['kid' => $kid]); |
| 186 | 186 | |
| 187 | - if (! $jwk) { |
|
| 187 | + if (!$jwk) { |
|
| 188 | 188 | $issuer->updateJwks(); |
| 189 | 189 | $jwk = $issuer->getJwks()->selectKey('sig', null, ['kid' => $kid]); |
| 190 | 190 | } |
| 191 | 191 | |
| 192 | - if (! $jwk) { |
|
| 192 | + if (!$jwk) { |
|
| 193 | 193 | throw new RuntimeException('Unable to find the jwk with the provided kid: ' . $kid); |
| 194 | 194 | } |
| 195 | 195 | |