Class: Ripcord::Authentication::HTTPTokenAuth

Inherits:
Object
  • Object
show all
Defined in:
lib/ripcord/authentication/http_token_auth.rb

Instance Method Summary collapse

Constructor Details

#initialize(token) ⇒ HTTPTokenAuth



3
4
5
# File 'lib/ripcord/authentication/http_token_auth.rb', line 3

def initialize(token)
  @token = token
end

Instance Method Details

#apply_to(request, payload_hash) ⇒ Object



7
8
9
# File 'lib/ripcord/authentication/http_token_auth.rb', line 7

def apply_to(request, payload_hash)
  request.add_field 'Authorization', "Token token=#{@token}"
end