Class: Webhookdb::Github
- Inherits:
-
Object
- Object
- Webhookdb::Github
- Includes:
- Appydays::Configurable
- Defined in:
- lib/webhookdb/github.rb
Class Method Summary collapse
Class Method Details
.parse_link_header(header) ⇒ Object
13 14 15 |
# File 'lib/webhookdb/github.rb', line 13 def self.parse_link_header(header) return Webhookdb::Shopify.parse_link_header(header) end |
.verify_webhook(body, hmac_header, webhook_secret) ⇒ Object
18 19 20 21 |
# File 'lib/webhookdb/github.rb', line 18 def self.verify_webhook(body, hmac_header, webhook_secret) calculated_hash = "sha256=" + OpenSSL::HMAC.hexdigest(OpenSSL::Digest.new("sha256"), webhook_secret, body) return ActiveSupport::SecurityUtils.secure_compare(calculated_hash, hmac_header) end |