Class: SpecialDelivery::Authenticator

Inherits:
Object
  • Object
show all
Defined in:
lib/special_delivery/authenticator.rb

Instance Method Summary collapse

Constructor Details

#initialize(event_params) ⇒ Authenticator

Returns a new instance of Authenticator.



3
4
5
# File 'lib/special_delivery/authenticator.rb', line 3

def initialize(event_params)
  @event_params = event_params.to_hash
end

Instance Method Details

#authentic?Boolean

Returns:

  • (Boolean)


7
8
9
10
11
# File 'lib/special_delivery/authenticator.rb', line 7

def authentic?
  actual_signature == expected_signature
rescue
  false
end