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 class Signet::OAuth2::Client.

Signet::OAuth2::Client creates an OAuth2 client


<br />

This reopens Client to add #apply and #apply! methods which update a
hash with the fetched authentication token.

## Inherits

- Object

## Includes

- [Google::Auth::BaseClient](https://docs.cloud.google.com/ruby/docs/reference/googleauth/latest/Google-Auth-BaseClient.md.txt)

## Methods

### #build_default_connection

```ruby
def build_default_connection()
```

### #configure_connection

```ruby
def configure_connection(options)
```

### #duplicate

```ruby
def duplicate(options = {})
```
Creates a duplicate of these credentials
without the Signet::OAuth2::Client-specific
transient state (e.g. cached tokens)
**Parameter**

- **options** (Hash) --- Overrides for the credentials parameters.

### #fetch_access_token!

```ruby
def fetch_access_token!(options = {})
```

### #generate_access_token_request

```ruby
def generate_access_token_request(options = {})
```

### #googleauth_orig_generate_access_token_request

```ruby
def googleauth_orig_generate_access_token_request()
```

### #orig_fetch_access_token!

```ruby
def orig_fetch_access_token!()
```

### #retry_with_error

```ruby
def retry_with_error(max_retry_count = 5) -> Object
```
Retries the provided block with exponential backoff, handling and wrapping errors.
**Parameter**

- **max_retry_count** (Integer) --- The maximum number of retries before giving up
**Yields**

- --- The block to execute and potentially retry
**Returns**

- (Object) --- The result of the block if successful
**Raises**

- ([Google::Auth::AuthorizationError](https://docs.cloud.google.com/ruby/docs/reference/googleauth/latest/Google-Auth-AuthorizationError.md.txt)) --- If a Signet::AuthorizationError occurs or if retries are exhausted
- ([Google::Auth::ParseError](https://docs.cloud.google.com/ruby/docs/reference/googleauth/latest/Google-Auth-ParseError.md.txt)) --- If a Signet::ParseError occurs during token parsing

### #token_type

```ruby
def token_type()
```
The token type as symbol, either :id_token or :access_token

### #universe_domain

```ruby
def universe_domain()
```
Set the universe domain

### #universe_domain=

```ruby
def universe_domain=(value)
```
Set the universe domain

### #update!

```ruby
def update!(options = {})
```

### #update_signet_base

```ruby
def update_signet_base()
```

### #update_token!

```ruby
def update_token!(options = {})
```

### #update_token_signet_base

```ruby
def update_token_signet_base()
```