Sha256: ef13222bc9a303b4dd5640c23402bf472810098ada500661ae9cbcaca7e59349

Contents?: true

Size: 437 Bytes

Versions: 4

Compression:

Stored size: 437 Bytes

Contents

require 'bootic_client/strategies/strategy'

module BooticClient
  module Strategies
    class Bearer < Strategy

      private

      def validate!
        raise ArgumentError, "options MUST include access_token" unless options[:access_token]
      end

      def request_headers
        {
          'Authorization' => "Bearer #{options[:access_token]}"
        }
      end
    end
  end

  strategies[:bearer] = Strategies::Bearer
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
bootic_client-0.0.21 lib/bootic_client/strategies/bearer.rb
bootic_client-0.0.20 lib/bootic_client/strategies/bearer.rb
bootic_client-0.0.19 lib/bootic_client/strategies/bearer.rb
bootic_client-0.0.18 lib/bootic_client/strategies/bearer.rb