googleauth - Class Google::Auth::GCECredentials (v1.12.0)

Reference documentation and code samples for the googleauth class Google::Auth::GCECredentials.

Extends Signet::OAuth2::Client so that the auth token is obtained from the GCE metadata server.

Methods

.on_gce?

def self.on_gce?(_options = {}, _reload = false) -> Boolean

Detect if this appear to be a GCE instance, by checking if metadata is available. The parameters are deprecated and unused.

Returns
  • (Boolean)

.reset_cache

def self.reset_cache()
Aliases

.unmemoize_all

def self.unmemoize_all()
Alias Of: .reset_cache

#fetch_access_token

def fetch_access_token(_options = {})

Overrides the super class method to change how access tokens are fetched.

#initialize

def initialize(options = {}) -> GCECredentials

Construct a GCECredentials

Returns