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

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 anyCredentials Client, including AwsCredentials, ServiceAccountCredentials,and UserRefreshCredentials. This is a superclass of Signet::OAuth2::Clientand has been created to create a generic interface for all credentials clientsto use, including ones which do not inherit from Signet::OAuth2::Client.

Methods

#apply

defapply(a_hash,opts={})

Returns a clone of a_hash updated with the authentication token

#apply!

defapply!(a_hash,opts={})

Updates a_hash updated with the authentication token

#expires_within?

defexpires_within?()->Boolean
Returns
  • (Boolean)
Raises
  • (NoMethodError)

#logger

deflogger()

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

#logger=

deflogger=(value)

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

#needs_access_token?

defneeds_access_token?()->Boolean

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

Returns
  • (Boolean)

#notify_refresh_listeners

defnotify_refresh_listeners()

#on_refresh

defon_refresh(&block)

#updater_proc

defupdater_proc()

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

Constants

AUTH_METADATA_KEY

value::authorization

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-10-30 UTC.