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.
Inherits
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.
- (Boolean)
.reset_cache
def self.reset_cache()
.unmemoize_all
def self.unmemoize_all()
#duplicate
def duplicate(options = {})
Creates a duplicate of these credentials without the Signet::OAuth2::Client-specific transient state (e.g. cached tokens)
-
options (Hash) —
Overrides for the credentials parameters. The following keys are recognized in addition to keys in the Signet::OAuth2::Client
:universe_domain_overridden
Whether the universe domain was overriden during credentials creation
#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
- (GCECredentials) — a new instance of GCECredentials