Sha256: dcd03241b79e70ff8499909374fa04e451e4d6712c74454a9dd29bece656fa9f

Contents?: true

Size: 460 Bytes

Versions: 19

Compression:

Stored size: 460 Bytes

Contents

# frozen_string_literal: true

module ShopifyApp
  class ExtensionVerificationController < ActionController::Base
    include ShopifyApp::PayloadVerification
    protect_from_forgery with: :null_session
    before_action :verify_request

    private

    def verify_request
      unless hmac_valid?(request.body.read)
        head(:unauthorized)
        ShopifyApp::Logger.debug("Extension verification failed due to invalid HMAC")
      end
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
shopify_app-22.4.0 app/controllers/shopify_app/extension_verification_controller.rb
shopify_app-22.3.1 app/controllers/shopify_app/extension_verification_controller.rb
shopify_app-22.3.0 app/controllers/shopify_app/extension_verification_controller.rb
shopify_app-22.2.1 app/controllers/shopify_app/extension_verification_controller.rb
shopify_app-22.2.0 app/controllers/shopify_app/extension_verification_controller.rb
shopify_app-22.1.0 app/controllers/shopify_app/extension_verification_controller.rb
shopify_app-22.0.1 app/controllers/shopify_app/extension_verification_controller.rb
shopify_app-22.00.0 app/controllers/shopify_app/extension_verification_controller.rb
shopify_app-21.10.0 app/controllers/shopify_app/extension_verification_controller.rb
shopify_app-21.9.0 app/controllers/shopify_app/extension_verification_controller.rb
shopify_app-21.8.1 app/controllers/shopify_app/extension_verification_controller.rb
shopify_app-21.8.0 app/controllers/shopify_app/extension_verification_controller.rb
shopify_app-21.7.0 app/controllers/shopify_app/extension_verification_controller.rb
shopify_app-21.6.0 app/controllers/shopify_app/extension_verification_controller.rb
shopify_app-21.5.0 app/controllers/shopify_app/extension_verification_controller.rb
shopify_app-21.4.1 app/controllers/shopify_app/extension_verification_controller.rb
shopify_app-21.4.0 app/controllers/shopify_app/extension_verification_controller.rb
shopify_app-21.3.1 app/controllers/shopify_app/extension_verification_controller.rb
shopify_app-21.3.0 app/controllers/shopify_app/extension_verification_controller.rb