1.17.8 (latest) 1.17.7 1.16.2 1.15.1 1.14.0 1.13.1 1.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 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.

## Included In

- [Google::Auth::APIKeyCredentials](https://docs.cloud.google.com/ruby/docs/reference/googleauth/latest/Google-Auth-APIKeyCredentials.md.txt)
- [Google::Auth::BearerTokenCredentials](https://docs.cloud.google.com/ruby/docs/reference/googleauth/latest/Google-Auth-BearerTokenCredentials.md.txt)
- [Google::Auth::ExternalAccount::BaseCredentials](https://docs.cloud.google.com/ruby/docs/reference/googleauth/latest/Google-Auth-ExternalAccount-BaseCredentials.md.txt)
- [Google::Auth::ImpersonatedServiceAccountCredentials](https://docs.cloud.google.com/ruby/docs/reference/googleauth/latest/Google-Auth-ImpersonatedServiceAccountCredentials.md.txt)
- [Signet::OAuth2::Client](https://docs.cloud.google.com/ruby/docs/reference/googleauth/latest/Signet-OAuth2-Client.md.txt)

## Methods

### #apply

```ruby
def apply(a_hash, opts = {})
```
Returns a clone of a_hash updated with the authentication token

### #apply!

```ruby
def apply!(a_hash, opts = {})
```
Updates a_hash updated with the authentication token

### #expires_within?

```ruby
def expires_within?() -> Boolean
```
**Returns**

- (Boolean)
**Raises**

- (NoMethodError)

### #logger

```ruby
def logger()
```
The logger used to log operations on this client, such as token refresh.

### #logger=

```ruby
def logger=(value)
```
The logger used to log operations on this client, such as token refresh.

### #needs_access_token?

```ruby
def needs_access_token?() -> Boolean
```
Whether the id_token or access_token is missing or about to expire.
**Returns**

- (Boolean)

### #notify_refresh_listeners

```ruby
def notify_refresh_listeners()
```

### #on_refresh

```ruby
def on_refresh(&block)
```

### #updater_proc

```ruby
def updater_proc()
```
Returns a reference to the #apply method, suitable for passing as
a closure

## Constants

### AUTH_METADATA_KEY

**value:**:authorization