|
@@ 297-300 (lines=4) @@
|
| 294 |
|
if (400 === $response->getStatusCode()) { |
| 295 |
|
// check for "invalid_grant" |
| 296 |
|
$responseData = $response->json(); |
| 297 |
|
if (!array_key_exists('error', $responseData) || 'invalid_grant' !== $responseData['error']) { |
| 298 |
|
// not an "invalid_grant", we can't deal with this here... |
| 299 |
|
throw new OAuthServerException($response); |
| 300 |
|
} |
| 301 |
|
|
| 302 |
|
throw new OAuthException('authorization_code was not accepted by the server'); |
| 303 |
|
} |
|
@@ 355-358 (lines=4) @@
|
| 352 |
|
if (400 === $response->getStatusCode()) { |
| 353 |
|
// check for "invalid_grant" |
| 354 |
|
$responseData = $response->json(); |
| 355 |
|
if (!array_key_exists('error', $responseData) || 'invalid_grant' !== $responseData['error']) { |
| 356 |
|
// not an "invalid_grant", we can't deal with this here... |
| 357 |
|
throw new OAuthServerException($response); |
| 358 |
|
} |
| 359 |
|
|
| 360 |
|
// delete the access_token, we assume the user revoked it |
| 361 |
|
$this->tokenStorage->deleteAccessToken($this->userId, $accessToken); |