Class: PaymentsApi::CustomHeaderAuth

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

Overview

Utility class for custom header authorization.

Class Method Summary collapse

Class Method Details

.apply(config, http_request) ⇒ Object

Add custom authentication to the request. be added.

Parameters:

  • The (HttpRequest)

    HttpRequest object to which authentication will



12
13
14
# File 'lib/payments_api/http/auth/custom_header_auth.rb', line 12

def self.apply(config, http_request)
  http_request.add_header('x-api-key', config.x_api_key)
end