Class: OnlinePayments::SDK::Authentication::Authenticator

Inherits:
Object
  • Object
show all
Defined in:
lib/onlinepayments/sdk/authentication/authenticator.rb

Overview

Abstract class that is responsible for authenticating requests sent to the Online Payments platform.

Direct Known Subclasses

V1HmacAuthenticator

Instance Method Summary collapse

Instance Method Details

#get_authorization(http_method, resource_uri, request_headers) ⇒ String

Returns a value that can be used for the “Authorization” header.

Parameters:

  • http_method (String)

    ‘GET’, ‘PUT’, ‘POST’ or ‘DELETE’ indicating which HTTP method will be used with the request

  • resource_uri (URI::HTTP)

    URI object that includes #path and #query of the URL that will be used, #query may be nil

  • request_headers (Array<OnlinePayments::SDK::Communication::RequestHeader>)

    all headers used by the request

Returns:

  • (String)

    the “Authorization” header value

Raises:

  • (NotImplementedError)


13
14
15
# File 'lib/onlinepayments/sdk/authentication/authenticator.rb', line 13

def get_authorization(http_method, resource_uri, request_headers)
  raise NotImplementedError
end