@@ -151,7 +151,7 @@ |
||
| 151 | 151 | return $redirectUri; |
| 152 | 152 | } catch (\InvalidArgumentException $e) { |
| 153 | 153 | throw new OAuthException('invalid_request', |
| 154 | - 'The request includes the malformed parameter redirect_uri. ' . $e->getMessage(), |
|
| 154 | + 'The request includes the malformed parameter redirect_uri. '.$e->getMessage(), |
|
| 155 | 155 | 'https://tools.ietf.org/html/rfc6749#section-4.1'); |
| 156 | 156 | } |
| 157 | 157 | } |
@@ -121,10 +121,11 @@ |
||
| 121 | 121 | $redirectUris = $client->getMetadata()->getRedirectUris(); |
| 122 | 122 | if (empty($redirectUris)) { |
| 123 | 123 | if ($client instanceof PublicClientInterface || |
| 124 | - ($client instanceof ConfidentialClientInterface && $responseType->isRegistrationOfRedirectUriRequired())) |
|
| 125 | - throw new OAuthException('invalid_request', |
|
| 124 | + ($client instanceof ConfidentialClientInterface && $responseType->isRegistrationOfRedirectUriRequired())) { |
|
| 125 | + throw new OAuthException('invalid_request', |
|
| 126 | 126 | 'Clients using flows with redirection MUST register their redirection URI values', |
| 127 | 127 | 'https://tools.ietf.org/html/rfc7591#section-2.1'); |
| 128 | + } |
|
| 128 | 129 | } else { |
| 129 | 130 | if ($requestRedirectUri) { |
| 130 | 131 | if (!in_array($requestRedirectUri, $redirectUris)) { |
@@ -43,7 +43,7 @@ |
||
| 43 | 43 | |
| 44 | 44 | public function getClaims() : array |
| 45 | 45 | { |
| 46 | - return $this->claims; |
|
| 46 | + return $this->claims; |
|
| 47 | 47 | } |
| 48 | 48 | |
| 49 | 49 | /** |
@@ -142,22 +142,22 @@ |
||
| 142 | 142 | public 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); |
@@ -126,7 +126,7 @@ |
||
| 126 | 126 | if (!in_array($macAlgorithm, [256, 384, 512])) { |
| 127 | 127 | throw new \UnexpectedValueException("Algotihmn '".$macAlgorithm."' not supported"); |
| 128 | 128 | } |
| 129 | - $macAlgorithm = 'sha' . $macAlgorithm; |
|
| 129 | + $macAlgorithm = 'sha'.$macAlgorithm; |
|
| 130 | 130 | |
| 131 | 131 | |
| 132 | 132 | $atHash = hash($macAlgorithm, $accessToken['access_token'], true); |