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::JsonKeyReader.

JsonKeyReader contains the behaviour used to read private key and
client email fields from the service account

## Included In

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

## Methods

### #read_json_key

```ruby
def read_json_key(json_key_io) -> Array(String, String, String, String, String)
```
Reads a JSON key from an IO object and extracts common fields.
**Parameter**

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

- (Array(String, String, String, String, String)) --- An array containing: private_key, client_email, project_id, quota_project_id, and universe_domain
**Raises**

- ([Google::Auth::InitializationError](https://docs.cloud.google.com/ruby/docs/reference/googleauth/latest/Google-Auth-InitializationError.md.txt)) --- If client_email or private_key fields are missing from the JSON