Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
namara / lib / authenticators / token_authenticator.rb
Size: Mime:
require_relative '../authenticator.rb'

class TokenAuthenticator < Authenticator
  attr_reader :token

  def initialize(account_url, token)
    @token = token
    super account_url
  end

  def headers
    { Authorization: "Bearer #{@token}",
      "X-NAMARA-CLIENT": 'ruby',
      "X-NAMARA-CLIENT-VERSION": Namara::VERSION }
  end
end