Class: Github::Webhook::Auth
- Inherits:
-
Object
- Object
- Github::Webhook::Auth
- Defined in:
- lib/github/webhook/auth.rb,
lib/github/webhook/auth/version.rb
Constant Summary collapse
- VERSION =
'0.0.1'
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app) ⇒ Auth
constructor
A new instance of Auth.
Constructor Details
#initialize(app) ⇒ Auth
Returns a new instance of Auth.
6 7 8 |
# File 'lib/github/webhook/auth.rb', line 6 def initialize app @app = app end |
Instance Method Details
#call(env) ⇒ Object
10 11 12 13 |
# File 'lib/github/webhook/auth.rb', line 10 def call env return [401, {}, ''] unless verify_signature(env.dup) @app.call env end |