debian-mirror-gitlab/lib/api/integrations/slack/concerns/verifies_request.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

24 lines
455 B
Ruby
Raw Normal View History

2023-07-09 08:55:56 +05:30
# frozen_string_literal: true
module API
class Integrations
module Slack
module Concerns
module VerifiesRequest
extend ActiveSupport::Concern
included do
before { verify_slack_request! }
helpers do
def verify_slack_request!
unauthorized! unless Request.verify!(request)
end
end
end
end
end
end
end
end