Class: Ingresses::Mandrill::InboundEmailsController::Authenticator

Inherits:
Object
  • Object
show all
Defined in:
actionmailbox/app/controllers/action_mailbox/ingresses/mandrill/inbound_emails_controller.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(request, key) ⇒ Authenticator

Returns a new instance of Authenticator.


64
65
66
# File 'actionmailbox/app/controllers/action_mailbox/ingresses/mandrill/inbound_emails_controller.rb', line 64

def initialize(request, key)
  @request, @key = request, key
end

Instance Attribute Details

#keyObject (readonly)

Returns the value of attribute key


62
63
64
# File 'actionmailbox/app/controllers/action_mailbox/ingresses/mandrill/inbound_emails_controller.rb', line 62

def key
  @key
end

#requestObject (readonly)

Returns the value of attribute request


62
63
64
# File 'actionmailbox/app/controllers/action_mailbox/ingresses/mandrill/inbound_emails_controller.rb', line 62

def request
  @request
end

Instance Method Details

#authenticated?Boolean

Returns:

  • (Boolean)

68
69
70
# File 'actionmailbox/app/controllers/action_mailbox/ingresses/mandrill/inbound_emails_controller.rb', line 68

def authenticated?
  ActiveSupport::SecurityUtils.secure_compare given_signature, expected_signature
end