Class: Worldline::Connect::SDK::Webhooks::SignatureValidator
- Inherits:
-
Object
- Object
- Worldline::Connect::SDK::Webhooks::SignatureValidator
- Defined in:
- lib/worldline/connect/sdk/webhooks/signature_validator.rb
Overview
Validator for webhooks signatures. Thread-safe.
Instance Method Summary collapse
-
#initialize(secret_key_store) ⇒ SignatureValidator
constructor
A new instance of SignatureValidator.
-
#validate(body, request_headers) ⇒ Object
Validates incoming request using request headers.
Constructor Details
#initialize(secret_key_store) ⇒ SignatureValidator
Returns a new instance of SignatureValidator.
12 13 14 15 |
# File 'lib/worldline/connect/sdk/webhooks/signature_validator.rb', line 12 def initialize(secret_key_store) raise ArgumentError if secret_key_store.nil? @secret_key_store = secret_key_store end |
Instance Method Details
#validate(body, request_headers) ⇒ Object
Validates incoming request using request headers
21 22 23 |
# File 'lib/worldline/connect/sdk/webhooks/signature_validator.rb', line 21 def validate(body, request_headers) validate_body(body, request_headers) end |