@@ -63,7 +63,7 @@ |
||
| 63 | 63 | * @throws OAuthException |
| 64 | 64 | */ |
| 65 | 65 | public function verifyAuthorizationRequest(AuthorizationEndpoint $authorizationEndpoint, array $requestData) { |
| 66 | - if(empty($requestData['nonce'])) { |
|
| 66 | + if (empty($requestData['nonce'])) { |
|
| 67 | 67 | throw new OAuthException('invalid_request', 'Nonce required'); |
| 68 | 68 | } |
| 69 | 69 | } |
@@ -124,11 +124,11 @@ discard block |
||
| 124 | 124 | return $this->resourceOwner->authenticate($this->prompt == self::PROMPT_SELECT_ACCOUNT, $this->loginHint); |
| 125 | 125 | } |
| 126 | 126 | |
| 127 | - if($this->idTokenHint) { |
|
| 127 | + if ($this->idTokenHint) { |
|
| 128 | 128 | //check if user associated to this id token is the current user. |
| 129 | - var_dump($this->idTokenHint['sub']);die; |
|
| 130 | - if($this->idTokenHint['sub'] !== $this->resourceOwner->getIdentifier()) { |
|
| 131 | - if($this->prompt == self::PROMPT_NONE) { |
|
| 129 | + var_dump($this->idTokenHint['sub']); die; |
|
| 130 | + if ($this->idTokenHint['sub'] !== $this->resourceOwner->getIdentifier()) { |
|
| 131 | + if ($this->prompt == self::PROMPT_NONE) { |
|
| 132 | 132 | throw new OAuthException('invalid_request'); |
| 133 | 133 | } |
| 134 | 134 | else { |
@@ -194,7 +194,7 @@ discard block |
||
| 194 | 194 | $this->maxAge = empty($requestData['max_age']) ? null : $requestData['max_age']; |
| 195 | 195 | $this->uiLocales = empty($requestData['ui_locales']) ? null : explode(' ', $requestData['ui_locales']); |
| 196 | 196 | |
| 197 | - if(!empty($requestData['id_token_hint'])) { |
|
| 197 | + if (!empty($requestData['id_token_hint'])) { |
|
| 198 | 198 | try { |
| 199 | 199 | $this->idTokenHint = $this->idTokenManager->decode($requestData['id_token_hint']); |
| 200 | 200 | } catch (\Exception $exception) { |
@@ -130,8 +130,7 @@ |
||
| 130 | 130 | if($this->idTokenHint['sub'] !== $this->resourceOwner->getIdentifier()) { |
| 131 | 131 | if($this->prompt == self::PROMPT_NONE) { |
| 132 | 132 | throw new OAuthException('invalid_request'); |
| 133 | - } |
|
| 134 | - else { |
|
| 133 | + } else { |
|
| 135 | 134 | throw new OAuthException('login_required'); |
| 136 | 135 | } |
| 137 | 136 | } |