Class: LoyaltyApIs::CustomerHeader
- Inherits:
-
CoreLibrary::HeaderAuth
- Object
- CoreLibrary::HeaderAuth
- LoyaltyApIs::CustomerHeader
- Defined in:
- lib/loyalty_ap_is/http/auth/customer_header.rb
Overview
Utility class for custom header authorization.
Instance Method Summary collapse
-
#error_message ⇒ Object
Display error message on occurrence of authentication failure.
-
#initialize(customer_header_credentials) ⇒ CustomerHeader
constructor
Initialization constructor.
Constructor Details
#initialize(customer_header_credentials) ⇒ CustomerHeader
Initialization constructor.
16 17 18 19 20 21 22 |
# File 'lib/loyalty_ap_is/http/auth/customer_header.rb', line 16 def initialize(customer_header_credentials) auth_params = {} auth_params['Authorization-Token'] = customer_header_credentials. unless customer_header_credentials.nil? || customer_header_credentials..nil? super auth_params end |
Instance Method Details
#error_message ⇒ Object
Display error message on occurrence of authentication failure.
11 12 13 |
# File 'lib/loyalty_ap_is/http/auth/customer_header.rb', line 11 def 'CustomerHeader: authorization_token is undefined.' end |