Sha256: 7aa290b273e0a66c3f0c5f4a4dd2d7167797c461a8799939da20490b1d8971c1

Contents?: true

Size: 547 Bytes

Versions: 1

Compression:

Stored size: 547 Bytes

Contents

require 'aws/pws'
require 'aws-sdk'
require 'aws/core'

module AWS
  module PWS
    class CredentialProvider
      include AWS::Core::CredentialProviders::Provider

      attr_reader :client

      def initialize
        @client = AWS::PWS::Client.new
      end

      # rubocop:disable AccessorMethodName
      def get_credentials
        {
          access_key_id: client.read('AWS_ACCESS_KEY_ID'),
          secret_access_key: client.read('AWS_SECRET_ACCESS_KEY')
        }
      end
      # rubocop:enable AccessorMethodName
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
aws-pws-0.1.1 lib/aws/pws/credential_provider.rb