Class: Worldline::Connect::SDK::Authentication::Authenticator

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

Overview

Abstract class that is responsible for authenticating requests sent to the Worldline Global Collect 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<Worldline::Connect::SDK::Communication::RequestHeader>)

    all headers used by the request

Returns:

  • (String)

    the “Authorization” header value

Raises:

  • (NotImplementedError)


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

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