@@ -184,11 +184,11 @@ |
||
| 184 | 184 | |
| 185 | 185 | |
| 186 | 186 | $responseModeIdentifier = $requestData['response_mode'] ?? $this->getResponseType()->getDefaultResponseMode(); |
| 187 | - if(!($responseMode = $this->responseModeManager->getResponseMode($responseModeIdentifier))) { |
|
| 187 | + if (!($responseMode = $this->responseModeManager->getResponseMode($responseModeIdentifier))) { |
|
| 188 | 188 | throw new OAuthException('invalid_request', 'response_mode invalid'); |
| 189 | 189 | } |
| 190 | 190 | |
| 191 | - if(in_array($responseModeIdentifier, $this->getResponseType()->getUnsupportedResponseModes())) { |
|
| 191 | + if (in_array($responseModeIdentifier, $this->getResponseType()->getUnsupportedResponseModes())) { |
|
| 192 | 192 | throw new OAuthException('invalid_request', 'response_mode unsupported'); |
| 193 | 193 | } |
| 194 | 194 | $this->responseMode = $responseMode; |
@@ -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 | */ |
@@ -74,25 +74,25 @@ discard block |
||
| 74 | 74 | ]; |
| 75 | 75 | |
| 76 | 76 | // todo, include if auth_time is marked as an essential claim by the client otherwise it is optional (conf ?) |
| 77 | - if(isset($data['max_age']) && $data['max_age']) { |
|
| 77 | + if (isset($data['max_age']) && $data['max_age']) { |
|
| 78 | 78 | $claims['auth_time'] = $resourceOwner->getTimeWhenAuthenticationOccured(); |
| 79 | 79 | } |
| 80 | 80 | |
| 81 | - if(isset($data['nonce']) && !is_null($data['nonce'])) { |
|
| 81 | + if (isset($data['nonce']) && !is_null($data['nonce'])) { |
|
| 82 | 82 | $claims['nonce'] = $data['nonce']; |
| 83 | 83 | } |
| 84 | 84 | |
| 85 | - if(empty($extendedResponseTypes)) { |
|
| 85 | + if (empty($extendedResponseTypes)) { |
|
| 86 | 86 | $standardClaims = $this->userInfoClaimsStorage->getClaims($resourceOwner); |
| 87 | 87 | |
| 88 | 88 | foreach ($this->userInfoClaimsStorage->getClaimsByScope($scope) as $claimRequested) { |
| 89 | - if(isset($standardClaims[$claimRequested]) && $standardClaims[$claimRequested]) { |
|
| 89 | + if (isset($standardClaims[$claimRequested]) && $standardClaims[$claimRequested]) { |
|
| 90 | 90 | $claims[$claimRequested] = $standardClaims[$claimRequested]; |
| 91 | 91 | } |
| 92 | 92 | } |
| 93 | 93 | } |
| 94 | 94 | |
| 95 | - if(isset($extendedResponseTypes['code'])) { |
|
| 95 | + if (isset($extendedResponseTypes['code'])) { |
|
| 96 | 96 | //c_hash |
| 97 | 97 | /** |
| 98 | 98 | * @var \OAuth2OLD\ResponseTypes\ResponseTypeInterface $responseType |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | $claims['c_hash'] = 'todo'; //todo |
| 104 | 104 | } |
| 105 | 105 | |
| 106 | - if(isset($extendedResponseTypes['token'])) { |
|
| 106 | + if (isset($extendedResponseTypes['token'])) { |
|
| 107 | 107 | //at_hash |
| 108 | 108 | /** |
| 109 | 109 | * @var \OAuth2OLD\ResponseTypes\ResponseTypeInterface $responseType |