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