@@ 311-314 (lines=4) @@ | ||
308 | if (400 === $response->getStatusCode()) { |
|
309 | // check for "invalid_grant" |
|
310 | $responseData = $response->json(); |
|
311 | if (!array_key_exists('error', $responseData) || 'invalid_grant' !== $responseData['error']) { |
|
312 | // not an "invalid_grant", we can't deal with this here... |
|
313 | throw new OAuthServerException($response); |
|
314 | } |
|
315 | ||
316 | throw new OAuthException('authorization_code was not accepted by the server'); |
|
317 | } |
|
@@ 369-372 (lines=4) @@ | ||
366 | if (400 === $response->getStatusCode()) { |
|
367 | // check for "invalid_grant" |
|
368 | $responseData = $response->json(); |
|
369 | if (!array_key_exists('error', $responseData) || 'invalid_grant' !== $responseData['error']) { |
|
370 | // not an "invalid_grant", we can't deal with this here... |
|
371 | throw new OAuthServerException($response); |
|
372 | } |
|
373 | ||
374 | // delete the access_token, we assume the user revoked it |
|
375 | $this->tokenStorage->deleteAccessToken($this->userId, $this->providerId, $accessToken); |