Sha256: ab5d913eebbe59e86cd476b38867e223aea2b0dd3c194ed805d916ad9b1ff441
Contents?: true
Size: 605 Bytes
Versions: 15
Compression:
Stored size: 605 Bytes
Contents
module DiscoApp::Concerns::CarrierRequestController extend ActiveSupport::Concern included do before_action :verify_carrier_request end private def verify_carrier_request unless carrier_request_signature_is_valid? head :unauthorized end end def carrier_request_signature_is_valid? return true if Rails.env.development? and DiscoApp.configuration.skip_carrier_request_verification? DiscoApp::CarrierRequestService.is_valid_hmac?(request.body.read.to_s, ShopifyApp.configuration.secret, request.headers['HTTP_X_SHOPIFY_HMAC_SHA256']) end end
Version data entries
15 entries across 15 versions & 1 rubygems