Sha256: 9875b95fd8efc228219b606d0b496abd44f08b9e88e398e7456d5f86b1fa3256
Contents?: true
Size: 597 Bytes
Versions: 21
Compression:
Stored size: 597 Bytes
Contents
# frozen_string_literal: true module ShopifyApp module WebhookVerification extend ActiveSupport::Concern include ShopifyApp::PayloadVerification included do skip_before_action :verify_authenticity_token, raise: false before_action :verify_request end private def verify_request data = request.raw_post unless hmac_valid?(data) ShopifyApp::Logger.debug("Webhook verification failed - HMAC invalid") head(:unauthorized) end end def shop_domain request.headers["HTTP_X_SHOPIFY_SHOP_DOMAIN"] end end end
Version data entries
21 entries across 21 versions & 1 rubygems