Sha256: abfa2734f6f7d11f53d611610e9d5ebe2cd14947f0ebff33e5fb7778e793416e
Contents?: true
Size: 741 Bytes
Versions: 9
Compression:
Stored size: 741 Bytes
Contents
# frozen_string_literal: true require 'aws-sdk-core' require 'awskeyring' module Awskeyring # Provide a credential provider for use as a library, eg. # require 'awskeyring/credential_provider' # client = Aws::STS::Client.new( # credentials: Awskeyring::CredentialProvider.new("company-acc") # ) class CredentialProvider include Aws::CredentialProvider attr_accessor :account def initialize(account) @account = account end # returns a new Aws::Credentials object def credentials cred = Awskeyring.get_valid_creds(account: account) Aws::Credentials.new(cred[:key], cred[:secret], cred[:token]) end end end
Version data entries
9 entries across 9 versions & 1 rubygems