@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | ? $metadata->getUserinfoSignedResponseAlg() |
84 | 84 | : $metadata->getIdTokenSignedResponseAlg(); |
85 | 85 | |
86 | - if (! $expectedAlg) { |
|
86 | + if (!$expectedAlg) { |
|
87 | 87 | throw new RuntimeException('Unable to verify id_token without an alg value'); |
88 | 88 | } |
89 | 89 | |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | |
96 | 96 | $payload = \json_decode(base64url_decode(\explode('.', $idToken)[1] ?? '{}'), true); |
97 | 97 | |
98 | - if (! \is_array($payload)) { |
|
98 | + if (!\is_array($payload)) { |
|
99 | 99 | throw new InvalidArgumentException('Unable to decode token payload'); |
100 | 100 | } |
101 | 101 | |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | |
121 | 121 | $requiredClaims = []; |
122 | 122 | |
123 | - if (! $fromUserInfo) { |
|
123 | + if (!$fromUserInfo) { |
|
124 | 124 | $requiredClaims = ['iss', 'sub', 'aud', 'exp', 'iat']; |
125 | 125 | } |
126 | 126 | |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | if (0 === \strpos($expectedAlg, 'HS')) { |
147 | 147 | $clientSecret = $metadata->getClientSecret(); |
148 | 148 | |
149 | - if (! $clientSecret) { |
|
149 | + if (!$clientSecret) { |
|
150 | 150 | throw new RuntimeException('Unable to verify token without client_secret'); |
151 | 151 | } |
152 | 152 | |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | |
160 | 160 | if ($kid) { |
161 | 161 | $jwk = $jwks->selectKey('sig', null, ['kid' => $kid]); |
162 | - if (! $jwk) { |
|
162 | + if (!$jwk) { |
|
163 | 163 | throw new RuntimeException('Unable to find the jwk with the provided kid: ' . $kid); |
164 | 164 | } |
165 | 165 | |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | $result = $jwsVerifier->verifyWithKeySet($jws, $jwks, 0); |
169 | 169 | } |
170 | 170 | |
171 | - if (! $result) { |
|
171 | + if (!$result) { |
|
172 | 172 | throw new InvalidArgumentException('Failed to validate JWT signature'); |
173 | 173 | } |
174 | 174 |