Class: Commerce::CustomHeaderAuth

Inherits:
Object
  • Object
show all
Defined in:
lib/commerce/http/auth/custom_header_auth.rb

Class Method Summary collapse

Class Method Details

.apply(http_request) ⇒ Object

Add custom authentication to the request.

Parameters:

  • The (HttpRequest)

    HttpRequest object to which authentication will be added.



7
8
9
# File 'lib/commerce/http/auth/custom_header_auth.rb', line 7

def self.apply(http_request)
  http_request.add_header("X-Authorization", Commerce.api_key)
end