1.17.7 (latest) 1.17.6 1.16.2 1.15.1 1.14.0 1.13.1 1.12.2 Reference documentation and code samples for the googleauth class Google::Auth::ExternalAccount::Credentials.

Provides an entrypoint for all Exernal Account credential classes.

## Inherits

- Object

## Methods

### .make_creds

```ruby
def self.make_creds(options = {}) -> Google::Auth::ExternalAccount::AwsCredentials, Google::Auth::ExternalAccount::IdentityPoolCredentials, Google::Auth::ExternalAccount::PluggableAuthCredentials
```
Create a ExternalAccount::Credentials


<br />

This method does not validate the credential configuration. A security
risk occurs when a credential configuration configured with malicious urls
is used.
When the credential configuration is accepted from an
untrusted source, you should validate it before using with this method.
See <https://cloud.google.com/docs/authentication/external/externally-sourced-credentials>
for more details.
**Parameter**

- **options** (Hash) --- Options for creating credentials
**Returns**

- ([Google::Auth::ExternalAccount::AwsCredentials](https://docs.cloud.google.com/ruby/docs/reference/googleauth/latest/Google-Auth-ExternalAccount-AwsCredentials.md.txt), [Google::Auth::ExternalAccount::IdentityPoolCredentials](https://docs.cloud.google.com/ruby/docs/reference/googleauth/latest/Google-Auth-ExternalAccount-IdentityPoolCredentials.md.txt), [Google::Auth::ExternalAccount::PluggableAuthCredentials](https://docs.cloud.google.com/ruby/docs/reference/googleauth/latest/Google-Auth-ExternalAccount-PluggableAuthCredentials.md.txt)) --- The appropriate external account credentials based on the credential source
**Raises**

- ([Google::Auth::InitializationError](https://docs.cloud.google.com/ruby/docs/reference/googleauth/latest/Google-Auth-InitializationError.md.txt)) --- If the json file is missing, lacks required fields, or does not contain a supported credential source

### .read_json_key

```ruby
def self.read_json_key(json_key_io) -> Hash
```
Reads the required fields from the JSON.
**Parameter**

- **json_key_io** (IO) --- An IO object containing the JSON key
**Returns**

- (Hash) --- The parsed JSON key
**Raises**

- ([Google::Auth::InitializationError](https://docs.cloud.google.com/ruby/docs/reference/googleauth/latest/Google-Auth-InitializationError.md.txt)) --- If the JSON is missing required fields

## Constants

### AWS_SUBJECT_TOKEN_TYPE

**value:** "urn:ietf:params:aws:token-type:aws4_request".freeze  
The subject token type used for AWS external_account credentials.

### MISSING_CREDENTIAL_SOURCE

**value:**"missing credential source for external account".freeze

### INVALID_EXTERNAL_ACCOUNT_TYPE

**value:**"credential source is not supported external account type".freeze