Created
August 31, 2011 18:40
-
-
Save swalberg/1184324 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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