Skip to content

Instantly share code, notes, and snippets.

@swalberg
Created August 31, 2011 18:40
Show Gist options
  • Save swalberg/1184324 to your computer and use it in GitHub Desktop.
Save swalberg/1184324 to your computer and use it in GitHub Desktop.
class ActionController::Base
def self.check_signatures(key, *args)
before_filter lambda { check_signature(key)}, *args
end
def self.check_signature(key)
raise InvalidWebhookSignature
end
end
class Webhooks::TestController < ApplicationController
check_signatures "abc123"
def index
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment