Sha256: 7bbe5a2420dd0b56dbbd70ff5f990a7a225de0eab3338e79a8d00ca608db1dfe

Contents?: true

Size: 400 Bytes

Versions: 2

Compression:

Stored size: 400 Bytes

Contents

require 'httparty'
require_relative 'auth/iam_token'

module YandexCloud
  # Authentification requests
  class Auth
    include HTTParty
    include YandexCloud::Auth::IamToken

    base_uri 'https://iam.api.cloud.yandex.net/iam/v1'
    format :json

    attr_reader :oauth_token

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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
yandex_cloud-0.3.0 lib/yandex_cloud/auth.rb
yandex_cloud-0.2.0 lib/yandex_cloud/auth.rb