googleauth - Module Google::Auth::BaseClient (v1.12.0)

Reference documentation and code samples for the googleauth module Google::Auth::BaseClient.

BaseClient is a class used to contain common methods that are required by any Credentials Client, including AwsCredentials, ServiceAccountCredentials, and UserRefreshCredentials. This is a superclass of Signet::OAuth2::Client and has been created to create a generic interface for all credentials clients to use, including ones which do not inherit from Signet::OAuth2::Client.

Methods

#apply

def apply(a_hash, opts = {})

Returns a clone of a_hash updated with the authentication token

#apply!

def apply!(a_hash, opts = {})

Updates a_hash updated with the authentication token

#expires_within?

def expires_within?() -> Boolean
Returns
  • (Boolean)
Raises
  • (NoMethodError)

#logger

def logger()

The logger used to log operations on this client, such as token refresh.

#logger=

def logger=(value)

The logger used to log operations on this client, such as token refresh.

#needs_access_token?

def needs_access_token?() -> Boolean

Whether the id_token or access_token is missing or about to expire.

Returns
  • (Boolean)

#notify_refresh_listeners

def notify_refresh_listeners()

#on_refresh

def on_refresh(&block)

#updater_proc

def updater_proc()

Returns a reference to the #apply method, suitable for passing as a closure

Constants

AUTH_METADATA_KEY

value: :authorization