|
@@ 308-311 (lines=4) @@
|
| 305 |
|
if (400 === $response->getStatusCode()) { |
| 306 |
|
// check for "invalid_grant" |
| 307 |
|
$responseData = $response->json(); |
| 308 |
|
if (!array_key_exists('error', $responseData) || 'invalid_grant' !== $responseData['error']) { |
| 309 |
|
// not an "invalid_grant", we can't deal with this here... |
| 310 |
|
throw new OAuthServerException($response); |
| 311 |
|
} |
| 312 |
|
|
| 313 |
|
throw new OAuthException('authorization_code was not accepted by the server'); |
| 314 |
|
} |
|
@@ 409-412 (lines=4) @@
|
| 406 |
|
if (400 === $response->getStatusCode()) { |
| 407 |
|
// check for "invalid_grant" |
| 408 |
|
$responseData = $response->json(); |
| 409 |
|
if (!array_key_exists('error', $responseData) || 'invalid_grant' !== $responseData['error']) { |
| 410 |
|
// not an "invalid_grant", we can't deal with this here... |
| 411 |
|
throw new OAuthServerException($response); |
| 412 |
|
} |
| 413 |
|
|
| 414 |
|
// delete the access_token, we assume the user revoked it |
| 415 |
|
$this->tokenStorage->deleteAccessToken($this->userId, $accessToken); |