Class: YandexCloud::Auth

Inherits:
Object
  • Object
show all
Includes:
HTTParty, IamToken
Defined in:
lib/yandex_cloud/auth.rb,
lib/yandex_cloud/auth/iam_token.rb

Overview

Authentification requests

Defined Under Namespace

Modules: IamToken

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from IamToken

#token

Constructor Details

#initialize(args = {}) ⇒ Auth

Returns a new instance of Auth.



15
16
17
# File 'lib/yandex_cloud/auth.rb', line 15

def initialize(args = {})
  @oauth_token = args[:oauth_token] || ENV['YANDEX_CLOUD_API_KEY']
end

Instance Attribute Details

#oauth_tokenObject (readonly)

Returns the value of attribute oauth_token.



13
14
15
# File 'lib/yandex_cloud/auth.rb', line 13

def oauth_token
  @oauth_token
end