module Google::Auth

def get_application_default(scope = nil, options = {})

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