@@ -37,11 +37,11 @@ |
||
37 | 37 | $tokenSet = $request->getAttribute(TokenSetInterface::class); |
38 | 38 | $client = $this->client ?: $request->getAttribute(ClientInterface::class); |
39 | 39 | |
40 | - if (! $client instanceof ClientInterface) { |
|
40 | + if (!$client instanceof ClientInterface) { |
|
41 | 41 | throw new LogicException('No OpenID client provided'); |
42 | 42 | } |
43 | 43 | |
44 | - if (! $tokenSet instanceof TokenSetInterface) { |
|
44 | + if (!$tokenSet instanceof TokenSetInterface) { |
|
45 | 45 | throw new RuntimeException('Unable to get token response attribute'); |
46 | 46 | } |
47 | 47 |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | { |
58 | 58 | $accessToken = $tokenSet->getAccessToken(); |
59 | 59 | |
60 | - if (! $accessToken) { |
|
60 | + if (!$accessToken) { |
|
61 | 61 | throw new RuntimeException('Unable to get an access token from the token set'); |
62 | 62 | } |
63 | 63 | |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | $endpointUri = $issuerMetadata->getMtlsEndpointAliases()['userinfo_endpoint'] ?? $endpointUri; |
73 | 73 | } |
74 | 74 | |
75 | - if (! $endpointUri) { |
|
75 | + if (!$endpointUri) { |
|
76 | 76 | throw new InvalidArgumentException('Invalid issuer userinfo endpoint'); |
77 | 77 | } |
78 | 78 | |
@@ -101,20 +101,20 @@ discard block |
||
101 | 101 | $payload = \json_decode((string) $response->getBody(), true); |
102 | 102 | } |
103 | 103 | |
104 | - if (! \is_array($payload)) { |
|
104 | + if (!\is_array($payload)) { |
|
105 | 105 | throw new RuntimeException('Unable to parse userinfo claims'); |
106 | 106 | } |
107 | 107 | |
108 | 108 | $idToken = $tokenSet->getIdToken(); |
109 | 109 | |
110 | - if (! $idToken) { |
|
110 | + if (!$idToken) { |
|
111 | 111 | return $payload; |
112 | 112 | } |
113 | 113 | |
114 | 114 | // check expected sub |
115 | 115 | $expectedSub = $tokenSet->claims()['sub'] ?? null; |
116 | 116 | |
117 | - if (! $expectedSub) { |
|
117 | + if (!$expectedSub) { |
|
118 | 118 | throw new RuntimeException('Unable to get sub claim from id_token'); |
119 | 119 | } |
120 | 120 |