Class: Mailgun::Tracking::Auth
- Inherits:
-
Object
- Object
- Mailgun::Tracking::Auth
- Defined in:
- lib/mailgun/tracking/auth.rb
Overview
Used to ensure the authenticity of event requests.
Constant Summary collapse
- SIGNATURE =
'signature'
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(payload) ⇒ Mailgun::Tracking::Auth
constructor
Initialize a Mailgun::Tracking::Auth object.
-
#valid? ⇒ Boolean
Compare the resulting hexdigest to the signature.
Constructor Details
#initialize(payload) ⇒ Mailgun::Tracking::Auth
Initialize a Mailgun::Tracking::Auth object.
23 24 25 |
# File 'lib/mailgun/tracking/auth.rb', line 23 def initialize(payload) @payload = payload end |
Class Method Details
.call(payload, _env = nil) ⇒ Boolean
14 15 16 |
# File 'lib/mailgun/tracking/auth.rb', line 14 def self.call(payload, _env = nil) new(payload).valid? end |