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