|
@@ -159,7 +159,7 @@ discard block |
|
|
block discarded – undo |
|
159
|
159
|
} |
|
160
|
160
|
|
|
161
|
161
|
// OpenID |
|
162
|
|
- if(!in_array('openid', $scope)) { |
|
|
162
|
+ if (!in_array('openid', $scope)) { |
|
163
|
163
|
return compact('client', 'redirectUri', 'responseTypes', 'data', 'scope', 'isSecure'); |
|
164
|
164
|
} |
|
165
|
165
|
|
|
@@ -204,7 +204,7 @@ discard block |
|
|
block discarded – undo |
|
204
|
204
|
if (!$scopePolicyManager->checkScope($client, $scope)) { |
|
205
|
205
|
$supportedScopes = implode(', ', $scopePolicyManager->getSupportedScopes($client)); |
|
206
|
206
|
throw new OAuthException('invalid_scope', |
|
207
|
|
- 'Some of requested scopes are not supported. Scope supported : ' . $supportedScopes, |
|
|
207
|
+ 'Some of requested scopes are not supported. Scope supported : '.$supportedScopes, |
|
208
|
208
|
'https://tools.ietf.org/html/rfc6749#section-4.1'); |
|
209
|
209
|
} |
|
210
|
210
|
|
|
@@ -213,13 +213,13 @@ discard block |
|
|
block discarded – undo |
|
213
|
213
|
|
|
214
|
214
|
protected function checkRedirectionEndpointConfidentiality(ClientInterface $client, array $responseTypes, Uri $redirectUri) : bool { |
|
215
|
215
|
$enforceTls = $this->server->getConfigurationRepository()->getConfig(Config::ENFORCE_TLS); |
|
216
|
|
- if($redirectUri->getScheme() === 'https') { |
|
|
216
|
+ if ($redirectUri->getScheme() === 'https') { |
|
217
|
217
|
return true; |
|
218
|
218
|
} |
|
219
|
219
|
|
|
220
|
220
|
foreach ($responseTypes as $responseType) { |
|
221
|
|
- if($responseType->requireTLS()) { |
|
222
|
|
- if($enforceTls === true || (is_null($enforceTls) && $client->isTLSSupported())) { |
|
|
221
|
+ if ($responseType->requireTLS()) { |
|
|
222
|
+ if ($enforceTls === true || (is_null($enforceTls) && $client->isTLSSupported())) { |
|
223
|
223
|
throw new OAuthException('access_denied', |
|
224
|
224
|
'Require the use of TLS for the redirect URI', |
|
225
|
225
|
'https://tools.ietf.org/html/rfc6749#section-3.1.2.1'); |
|
@@ -340,12 +340,12 @@ discard block |
|
|
block discarded – undo |
|
340
|
340
|
$responseType = $this->server->getResponseTypeRepository()->getResponseType($responseTypeName); |
|
341
|
341
|
if (!$responseType) { |
|
342
|
342
|
throw new OAuthException('invalid_request', |
|
343
|
|
- 'Unknown response_type : ' . $responseTypeName); |
|
|
343
|
+ 'Unknown response_type : '.$responseTypeName); |
|
344
|
344
|
} |
|
345
|
345
|
|
|
346
|
346
|
if (!$responseType->isMultiValuedResponseTypeSupported() == ResponseTypeInterface::RESPONSE_MODE_FRAGMENT) { |
|
347
|
347
|
throw new OAuthException('invalid_request', |
|
348
|
|
- 'Multi-valued response_type not supported with response_type : ' . $responseTypeName); |
|
|
348
|
+ 'Multi-valued response_type not supported with response_type : '.$responseTypeName); |
|
349
|
349
|
} |
|
350
|
350
|
|
|
351
|
351
|
$responseTypes[] = $responseType; |
|
@@ -393,7 +393,7 @@ discard block |
|
|
block discarded – undo |
|
393
|
393
|
|
|
394
|
394
|
if (!in_array($responseMode, $supportedResponsesModes)) { |
|
395
|
395
|
throw new OAuthException('invalid_request', |
|
396
|
|
- 'Unsupported response_mode. Supported response_mode are : ' . implode(', ', $supportedResponsesModes)); |
|
|
396
|
+ 'Unsupported response_mode. Supported response_mode are : '.implode(', ', $supportedResponsesModes)); |
|
397
|
397
|
} |
|
398
|
398
|
|
|
399
|
399
|
if ($responseMode === ResponseTypeInterface::RESPONSE_MODE_QUERY && !$isResponseModeQueryAllowed) { |