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 / api_key_authenticator.rb
Size: Mime:
require_relative '../authenticator.rb'

class ApiKeyAuthenticator < Authenticator
  def initialize(account_url, api_key)
    @api_key = api_key
    super account_url
  end

  def headers
    { "X-API-KEY": @api_key,
      "X-NAMARA-CLIENT": 'ruby',
      "X-NAMARA-CLIENT-VERSION": Namara::VERSION }
  end

  def token
    fetch_token
  end
end