Class: ActiveWebhook::Verification::HMACSHA256Adapter
- Inherits:
-
BaseAdapter
- Object
- Adapter
- BaseAdapter
- ActiveWebhook::Verification::HMACSHA256Adapter
- Defined in:
- lib/active_webhook/verification/hmac_sha256_adapter.rb
Instance Method Summary collapse
Methods inherited from BaseAdapter
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
#signature ⇒ Object
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 |
#strategy ⇒ Object
15 16 17 |
# File 'lib/active_webhook/verification/hmac_sha256_adapter.rb', line 15 def strategy "Hmac-SHA256" end |