Closed GoogleCodeExporter closed 8 years ago
If it fails we will throw a Google_AuthException
Original comment by ianbar...@google.com
on 22 Mar 2013 at 3:39
[deleted comment]
Sorry, this problem is on revokeToken method.
Especially in method Google_OAuth2->revokeToken()
There are not throw Google_Authexception.
if (!$token) {
$token = $this->token['access_token'];
}
$request = new Google_HttpRequest(self::OAUTH2_REVOKE_URI, 'POST', array(), "token=$token");
$response = Google_Client::$io->makeRequest($request);
// should be added
$body = $request->getResponseBody();
//////////////////
$code = $response->getResponseHttpCode();
if ($code == 200) {
$this->token = null;
return true;
}
// should be added
else {
throw new Google_AuthException("Error revoking the OAuth2 token, message: '$body'", $code);
}
//////////////////
// should be removed
return false;
////////////////////
Original comment by atish...@gmail.com
on 22 Mar 2013 at 4:16
Original issue reported on code.google.com by
atish...@gmail.com
on 18 Sep 2012 at 10:08