Class: Mach::Validation::SignatureValidator
- Inherits:
-
Object
- Object
- Mach::Validation::SignatureValidator
- Defined in:
- lib/mach/validation/signature_validator.rb
Class Method Summary collapse
Class Method Details
.valid?(hmac_request) ⇒ Boolean
8 9 10 11 12 13 14 15 |
# File 'lib/mach/validation/signature_validator.rb', line 8 def valid?(hmac_request) if secret = credential_store[hmac_request.mac_id] data = hmac_request.mac_normalized_request_string Mach::Signature.new(secret, data).matches?(hmac_request.mac_signature) else false end end |