Sha256: c8622058232f38171683f10de7edaba683096e556100d83e17fd2b685209052e

Contents?: true

Size: 716 Bytes

Versions: 8

Compression:

Stored size: 716 Bytes

Contents

module Roqua
  module CoreApi
    module Sessions
      class HmacAuthSession < AuthSession
        attr_reader :consumer_key, :consumer_secret

        delegate :headers, :access_denied, to: :hmac_auth_request

        def initialize(consumer_key: ENV.fetch('CORE_CONSUMER_KEY'),
                       consumer_secret: ENV.fetch('CORE_CONSUMER_SECRET'),
                       **additional_arguments)
          @consumer_key = consumer_key
          @consumer_secret = consumer_secret
          super additional_arguments
        end

        private

        def hmac_auth_request
          HmacAuthRequest.new(consumer_key: consumer_key, consumer_secret: consumer_secret)
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
roqua-core-api-0.6.0 lib/roqua/core_api/sessions/hmac_auth_session.rb
roqua-core-api-0.5.0 lib/roqua/core_api/sessions/hmac_auth_session.rb
roqua-core-api-0.4.0 lib/roqua/core_api/sessions/hmac_auth_session.rb
roqua-core-api-0.3.1 lib/roqua/core_api/sessions/hmac_auth_session.rb
roqua-core-api-0.3.0 lib/roqua/core_api/sessions/hmac_auth_session.rb
roqua-core-api-0.2.4 lib/roqua/core_api/sessions/hmac_auth_session.rb
roqua-core-api-0.2.3 lib/roqua/core_api/sessions/hmac_auth_session.rb
roqua-core-api-0.2.2 lib/roqua/core_api/sessions/hmac_auth_session.rb