Class: ActiveWebhook::Verification::HMACSHA256Adapter

Inherits:
BaseAdapter show all
Defined in:
lib/active_webhook/verification/hmac_sha256_adapter.rb

Instance Method Summary collapse

Methods inherited from BaseAdapter

#call

Methods inherited from Adapter

attribute, attributes, #attributes, call, #call, #component_configuration, component_configuration, component_name, configuration, #configuration, #initialize

Constructor Details

This class inherits a constructor from ActiveWebhook::Adapter

Instance Method Details

#signatureObject



11
12
13
# File 'lib/active_webhook/verification/hmac_sha256_adapter.rb', line 11

def signature
  Base64.strict_encode64(OpenSSL::HMAC.digest("sha256", secret, data))
end

#strategyObject



15
16
17
# File 'lib/active_webhook/verification/hmac_sha256_adapter.rb', line 15

def strategy
  "Hmac-SHA256"
end