Class: CloudSQLRubyConnector::Credentials::UserCredentials

Inherits:
Base
  • Object
show all
Defined in:
lib/cloud_sql_ruby_connector/credentials/user_credentials.rb

Overview

User credentials from gcloud auth application-default login

Constant Summary

Constants inherited from Base

Base::SCOPES, Base::TOKEN_URI

Instance Method Summary collapse

Methods inherited from Base

#access_token

Constructor Details

#initialize(data) ⇒ UserCredentials

Returns a new instance of UserCredentials.



24
25
26
27
28
29
30
# File 'lib/cloud_sql_ruby_connector/credentials/user_credentials.rb', line 24

def initialize(data)
  super()
  validate_required_fields!(data)
  @client_id = data["client_id"]
  @client_secret = data["client_secret"]
  @refresh_token_value = data["refresh_token"]
end