module Aws::Google::CredentialProvider

Inserts GoogleCredentials into the default AWS credential provider chain. Google credentials will only be used if Aws::Google.config is set before initialization.

Public Instance Methods

google_credentials(options) click to toggle source
# File lib/aws/google/credential_provider.rb, line 12
def google_credentials(options)
  profile_name = determine_profile_name(options)
  if Aws.shared_config.config_enabled?
    Aws.shared_config.google_credentials_from_config(profile: profile_name)
  end
rescue Errors::NoSuchProfileError
  nil
end
providers() click to toggle source

Insert google_credentials as the third-to-last credentials provider (in front of process credentials and instance_profile credentials).

Calls superclass method
# File lib/aws/google/credential_provider.rb, line 8
def providers
  super.insert(-3, [:google_credentials, {}])
end