module Google::Auth

def get_application_default(scope, options = {})

Parameters:
  • options (hash) -- allows override of the connection being used
  • scope (string|array) -- the scope(s) to access
def get_application_default(scope, options = {})
  creds = ServiceAccountCredentials.from_env(scope)
  return creds unless creds.nil?
  creds = ServiceAccountCredentials.from_well_known_path(scope)
  return creds unless creds.nil?
  fail NOT_FOUND_ERROR unless GCECredentials.on_gce?(options)
  GCECredentials.new
end