Sha256: ee726076d5323f7926e13916f5d8f8b5aae3c60b8ef70040d94173d743881887

Contents?: true

Size: 414 Bytes

Versions: 2

Compression:

Stored size: 414 Bytes

Contents

module YandexCloud
  class Auth
    # Module for getting IAM token
    module IamToken
      # Get IAM token
      def token
        # define params for request
        body = { 'yandexPassportOauthToken' => oauth_token }
        headers = { 'Content-Type' => 'application/json' }
        # make request
        self.class.post('/tokens', query: body, headers: headers).parsed_response
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

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