@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | |
72 | 72 | $payload = json_decode(base64url_decode(explode('.', $token)[1] ?? '{}'), true); |
73 | 73 | |
74 | - if (! is_array($payload)) { |
|
74 | + if (!is_array($payload)) { |
|
75 | 75 | throw new InvalidArgumentException('Unable to decode token payload'); |
76 | 76 | } |
77 | 77 | |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | |
109 | 109 | $jwks = $this->getSigningJWKSet($client, $expectedAlg, $kid); |
110 | 110 | |
111 | - if (! $this->jwsVerifier->verifyWithKeySet($jws, $jwks, 0)) { |
|
111 | + if (!$this->jwsVerifier->verifyWithKeySet($jws, $jwks, 0)) { |
|
112 | 112 | throw new InvalidArgumentException('Failed to validate JWT signature'); |
113 | 113 | } |
114 | 114 |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | |
93 | 93 | $payload = json_decode(base64url_decode(explode('.', $idToken)[1] ?? '{}'), true); |
94 | 94 | |
95 | - if (! is_array($payload)) { |
|
95 | + if (!is_array($payload)) { |
|
96 | 96 | throw new InvalidArgumentException('Unable to decode token payload'); |
97 | 97 | } |
98 | 98 | |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | |
118 | 118 | $requiredClaims = []; |
119 | 119 | |
120 | - if (! $fromUserInfo) { |
|
120 | + if (!$fromUserInfo) { |
|
121 | 121 | $requiredClaims = ['iss', 'sub', 'aud', 'exp', 'iat']; |
122 | 122 | } |
123 | 123 | |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | |
142 | 142 | $jwks = $this->getSigningJWKSet($client, $expectedAlg, $kid); |
143 | 143 | |
144 | - if (! $this->jwsVerifier->verifyWithKeySet($jws, $jwks, 0)) { |
|
144 | + if (!$this->jwsVerifier->verifyWithKeySet($jws, $jwks, 0)) { |
|
145 | 145 | throw new InvalidArgumentException('Failed to validate JWT signature'); |
146 | 146 | } |
147 | 147 |
@@ -62,7 +62,7 @@ |
||
62 | 62 | $header = json_decode(base64url_decode(explode('.', $idToken)[0] ?? '{}'), true); |
63 | 63 | $payload = json_decode(base64url_decode(explode('.', $idToken)[1] ?? '{}'), true); |
64 | 64 | |
65 | - if (! is_array($payload)) { |
|
65 | + if (!is_array($payload)) { |
|
66 | 66 | throw new InvalidArgumentException('Unable to decode token payload'); |
67 | 67 | } |
68 | 68 |
@@ -53,7 +53,7 @@ |
||
53 | 53 | return $this->jwsBuilder; |
54 | 54 | } |
55 | 55 | |
56 | - if (! class_exists(HS256::class)) { |
|
56 | + if (!class_exists(HS256::class)) { |
|
57 | 57 | throw new LogicException('To use the client_secret_jwt auth method you should install web-token/jwt-signature-algorithm-hmac package'); |
58 | 58 | } |
59 | 59 |
@@ -580,7 +580,7 @@ |
||
580 | 580 | */ |
581 | 581 | private function getFilteredClaims(): array |
582 | 582 | { |
583 | - return array_filter($this->metadata, static function ($value, string $key) { |
|
583 | + return array_filter($this->metadata, static function($value, string $key) { |
|
584 | 584 | return array_key_exists($key, self::$requiredKeys) |
585 | 585 | || $value !== (self::$defaults[$key] ?? null); |
586 | 586 | }, ARRAY_FILTER_USE_BOTH); |
@@ -580,7 +580,7 @@ |
||
580 | 580 | */ |
581 | 581 | private function getFilteredClaims(): array |
582 | 582 | { |
583 | - return array_filter($this->metadata, static function ($value, string $key) { |
|
583 | + return array_filter($this->metadata, static function($value, string $key) { |
|
584 | 584 | return array_key_exists($key, self::$requiredKeys) |
585 | 585 | || $value !== (self::$defaults[$key] ?? null); |
586 | 586 | }, ARRAY_FILTER_USE_BOTH); |
@@ -45,11 +45,11 @@ |
||
45 | 45 | $client = $this->client ?: $request->getAttribute(ClientInterface::class); |
46 | 46 | $authSession = $request->getAttribute(AuthSessionInterface::class); |
47 | 47 | |
48 | - if (! $client instanceof ClientInterface) { |
|
48 | + if (!$client instanceof ClientInterface) { |
|
49 | 49 | throw new LogicException('No OpenID client provided'); |
50 | 50 | } |
51 | 51 | |
52 | - if (null !== $authSession && ! $authSession instanceof AuthSessionInterface) { |
|
52 | + if (null !== $authSession && !$authSession instanceof AuthSessionInterface) { |
|
53 | 53 | throw new LogicException('Invalid auth session provided in attribute ' . AuthSessionInterface::class); |
54 | 54 | } |
55 | 55 |