Skip to content

Commit

Permalink
update auth urls
Browse files Browse the repository at this point in the history
  • Loading branch information
TheRoyalTnetennba committed Aug 7, 2018
1 parent 9609420 commit ee9c834
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions google-cloud-core/lib/google/cloud/credentials.rb
Expand Up @@ -30,8 +30,8 @@ module Cloud
# This class is intended to be inherited by API-specific classes
# which overrides the SCOPE constant.
class Credentials
TOKEN_CREDENTIAL_URI = "https://accounts.google.com/o/oauth2/token"
AUDIENCE = "https://accounts.google.com/o/oauth2/token"
TOKEN_CREDENTIAL_URI = "https://oauth2.googleapis.com/token"
AUDIENCE = "https://oauth2.googleapis.com/token"
SCOPE = []
PATH_ENV_VARS = %w[GOOGLE_CLOUD_KEYFILE GCLOUD_KEYFILE]
JSON_ENV_VARS = %w[GOOGLE_CLOUD_KEYFILE_JSON GCLOUD_KEYFILE_JSON]
Expand Down
8 changes: 4 additions & 4 deletions google-cloud-core/test/google/cloud/credentials_test.rb
Expand Up @@ -35,8 +35,8 @@
mocked_signet.expect :fetch_access_token!, true

stubbed_signet = ->(options, scope: nil) {
options[:token_credential_uri].must_equal "https://accounts.google.com/o/oauth2/token"
options[:audience].must_equal "https://accounts.google.com/o/oauth2/token"
options[:token_credential_uri].must_equal "https://oauth2.googleapis.com/token"
options[:audience].must_equal "https://oauth2.googleapis.com/token"
options[:scope].must_equal []
options[:issuer].must_equal default_keyfile_hash["client_email"]
options[:signing_key].must_be_kind_of OpenSSL::PKey::RSA
Expand All @@ -56,8 +56,8 @@
mocked_signet.expect :fetch_access_token!, true

stubbed_signet = ->(options, scope: nil) {
options[:token_credential_uri].must_equal "https://accounts.google.com/o/oauth2/token"
options[:audience].must_equal "https://accounts.google.com/o/oauth2/token"
options[:token_credential_uri].must_equal "https://oauth2.googleapis.com/token"
options[:audience].must_equal "https://oauth2.googleapis.com/token"
options[:scope].must_equal ["http://example.com/scope"]
options[:issuer].must_equal default_keyfile_hash["client_email"]
options[:signing_key].must_be_kind_of OpenSSL::PKey::RSA
Expand Down

0 comments on commit ee9c834

Please sign in to comment.