Class: Worldline::Acquiring::SDK::Authentication::Authenticator

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

Overview

Abstract class that is responsible for authenticating requests sent to the Worldline Acquiring platform.

Direct Known Subclasses

OAuth2Authenticator

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<Worldline::Acquiring::SDK::Communication::RequestHeader>)

    all headers used by the request

Returns:

  • (String)

    the “Authorization” header value

Raises:

  • (NotImplementedError)


14
15
16
# File 'lib/worldline/acquiring/sdk/authentication/authenticator.rb', line 14

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