Skip to content

Commit

Permalink
Use new auth urls (#1492)
Browse files Browse the repository at this point in the history
  • Loading branch information
chingor13 authored and mattwhisenhunt committed Aug 13, 2018
1 parent 787d68d commit 6fe60b1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/Google/Client.php
Expand Up @@ -40,8 +40,8 @@ class Google_Client
{
const LIBVER = "2.2.2";
const USER_AGENT_SUFFIX = "google-api-php-client/";
const OAUTH2_REVOKE_URI = 'https://accounts.google.com/o/oauth2/revoke';
const OAUTH2_TOKEN_URI = 'https://www.googleapis.com/oauth2/v4/token';
const OAUTH2_REVOKE_URI = 'https://oauth2.googleapis.com/revoke';
const OAUTH2_TOKEN_URI = 'https://oauth2.googleapis.com/token';
const OAUTH2_AUTH_URL = 'https://accounts.google.com/o/oauth2/auth';
const API_BASE_PATH = 'https://www.googleapis.com';

Expand Down
2 changes: 1 addition & 1 deletion tests/BaseTest.php
Expand Up @@ -123,7 +123,7 @@ public function tryToGetAnAccessToken(Google_Client $client)
$client->setRedirectUri("urn:ietf:wg:oauth:2.0:oob");
$client->setConfig('access_type', 'offline');
$authUrl = $client->createAuthUrl();

echo "\nGo to: $authUrl\n";
echo "\nPlease enter the auth code:\n";
ob_flush();
`open '$authUrl'`;
Expand Down
4 changes: 2 additions & 2 deletions tests/Google/ClientTest.php
Expand Up @@ -342,7 +342,7 @@ public function testJsonConfig()
$client = new Google_Client();
$device =
'{"installed":{"auth_uri":"https://accounts.google.com/o/oauth2/auth","client_secret"'.
':"N0aHCBT1qX1VAcF5J1pJAn6S","token_uri":"https://accounts.google.com/o/oauth2/token",'.
':"N0aHCBT1qX1VAcF5J1pJAn6S","token_uri":"https://oauth2.googleapis.com/token",'.
'"client_email":"","redirect_uris":["urn:ietf:wg:oauth:2.0:oob","oob"],"client_x509_cert_url"'.
':"","client_id":"123456789.apps.googleusercontent.com","auth_provider_x509_cert_url":'.
'"https://www.googleapis.com/oauth2/v1/certs"}}';
Expand All @@ -355,7 +355,7 @@ public function testJsonConfig()
// Web config
$client = new Google_Client();
$web = '{"web":{"auth_uri":"https://accounts.google.com/o/oauth2/auth","client_secret"' .
':"lpoubuib8bj-Fmke_YhhyHGgXc","token_uri":"https://accounts.google.com/o/oauth2/token"' .
':"lpoubuib8bj-Fmke_YhhyHGgXc","token_uri":"https://oauth2.googleapis.com/token"' .
',"client_email":"123456789@developer.gserviceaccount.com","client_x509_cert_url":'.
'"https://www.googleapis.com/robot/v1/metadata/x509/123456789@developer.gserviceaccount.com"'.
',"client_id":"123456789.apps.googleusercontent.com","auth_provider_x509_cert_url":'.
Expand Down

0 comments on commit 6fe60b1

Please sign in to comment.