@@ -47,7 +47,7 @@ |
||
| 47 | 47 | */ |
| 48 | 48 | $scope = $requestData['scope'] ?? ''; |
| 49 | 49 | $scopes = explode(' ', $scope); |
| 50 | - if(!in_array('openid', $scopes)) { |
|
| 50 | + if (!in_array('openid', $scopes)) { |
|
| 51 | 51 | return parent::handleRequest($request); |
| 52 | 52 | } |
| 53 | 53 | |
@@ -121,8 +121,7 @@ |
||
| 121 | 121 | * specified in the Authorization Request using the application/x-www-form-urlencoded format, |
| 122 | 122 | * unless a different Response Mode was specified. |
| 123 | 123 | */ |
| 124 | - } |
|
| 125 | - catch (OAuthException $e) { |
|
| 124 | + } catch (OAuthException $e) { |
|
| 126 | 125 | /** |
| 127 | 126 | * If the Authorization Server encounters any error, it MUST return an error response, per Section 3.1.2.6. |
| 128 | 127 | */ |
@@ -59,7 +59,7 @@ |
||
| 59 | 59 | $supportedScopes = explode(' ', $client->getMetadata()->getScope()); |
| 60 | 60 | if (!empty(array_diff($scopes, $supportedScopes))) { |
| 61 | 61 | throw new OAuthException('invalid_scope', |
| 62 | - 'The request scope is invalid. Supported scopes : ' . $client->getMetadata()->getScope(), |
|
| 62 | + 'The request scope is invalid. Supported scopes : '.$client->getMetadata()->getScope(), |
|
| 63 | 63 | 'https://tools.ietf.org/html/rfc6749#section-4.1'); |
| 64 | 64 | } |
| 65 | 65 | } |
@@ -230,7 +230,7 @@ |
||
| 230 | 230 | |
| 231 | 231 | $this->redirectUri = $redirectUri; |
| 232 | 232 | } catch (\InvalidArgumentException $e) { |
| 233 | - throw new OAuthException('invalid_request', 'The request includes the malformed parameter redirect_uri. ' . $e->getMessage(), |
|
| 233 | + throw new OAuthException('invalid_request', 'The request includes the malformed parameter redirect_uri. '.$e->getMessage(), |
|
| 234 | 234 | 'https://tools.ietf.org/html/rfc6749#section-4.1'); |
| 235 | 235 | } |
| 236 | 236 | } |
@@ -30,12 +30,12 @@ |
||
| 30 | 30 | { |
| 31 | 31 | $missingClaims = array_diff(self::REQUIRED_CLAIMS, array_keys($claims)); |
| 32 | 32 | if (!empty($missingClaims)) { |
| 33 | - throw new \Exception('Missing claims : ' . implode(', ', $missingClaims)); |
|
| 33 | + throw new \Exception('Missing claims : '.implode(', ', $missingClaims)); |
|
| 34 | 34 | } |
| 35 | 35 | |
| 36 | 36 | $undefinedClaims = array_diff(array_keys($claims), self::DEFINED_CLAIMS); |
| 37 | 37 | if (!empty($undefinedClaims)) { |
| 38 | - throw new \Exception('Undefined claims : ' . implode(', ', $undefinedClaims)); |
|
| 38 | + throw new \Exception('Undefined claims : '.implode(', ', $undefinedClaims)); |
|
| 39 | 39 | } |
| 40 | 40 | |
| 41 | 41 | // todo check nonce required if present in authentication request |
@@ -142,22 +142,22 @@ |
||
| 142 | 142 | function jsonSerialize() |
| 143 | 143 | { |
| 144 | 144 | $data = []; |
| 145 | - if($this->formatted) { |
|
| 145 | + if ($this->formatted) { |
|
| 146 | 146 | $data['formatted'] = $this->formatted; |
| 147 | 147 | } |
| 148 | - if($this->streetAddress) { |
|
| 148 | + if ($this->streetAddress) { |
|
| 149 | 149 | $data['street_address'] = $this->streetAddress; |
| 150 | 150 | } |
| 151 | - if($this->locality) { |
|
| 151 | + if ($this->locality) { |
|
| 152 | 152 | $data['locality'] = $this->locality; |
| 153 | 153 | } |
| 154 | - if($this->region) { |
|
| 154 | + if ($this->region) { |
|
| 155 | 155 | $data['region'] = $this->region; |
| 156 | 156 | } |
| 157 | - if($this->postalCode) { |
|
| 157 | + if ($this->postalCode) { |
|
| 158 | 158 | $data['postal_code'] = $this->postalCode; |
| 159 | 159 | } |
| 160 | - if($this->country) { |
|
| 160 | + if ($this->country) { |
|
| 161 | 161 | $data['country'] = $this->country; |
| 162 | 162 | } |
| 163 | 163 | return empty($data) ? '' : json_encode($data); |
@@ -445,7 +445,7 @@ |
||
| 445 | 445 | { |
| 446 | 446 | $getter = 'get'.ucfirst($this->snakeToCamel($offset)); |
| 447 | 447 | $result = $this->{$getter}(); |
| 448 | - if(is_object($result)) { |
|
| 448 | + if (is_object($result)) { |
|
| 449 | 449 | return json_encode($result); |
| 450 | 450 | } |
| 451 | 451 | return $result; |