Class: Authmac::Authenticator

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

Instance Method Summary collapse

Constructor Details

#initialize(hmac_checker, timestamp_checker) ⇒ Authenticator

Returns a new instance of Authenticator.



32
33
34
35
# File 'lib/authmac.rb', line 32

def initialize(hmac_checker, timestamp_checker)
  @hmac_checker = hmac_checker
  @timestamp_checker = timestamp_checker
end

Instance Method Details

#validate(params) ⇒ Object



37
38
39
40
# File 'lib/authmac.rb', line 37

def validate(params)
  ValidationResult.new(hmac:      validate_hmac(params),
                       timestamp: validate_timestamp(params))
end