Class: Authmac::ValidationResult
- Inherits:
-
Object
- Object
- Authmac::ValidationResult
- Defined in:
- lib/authmac.rb
Instance Method Summary collapse
- #failure? ⇒ Boolean
- #hmac_failure? ⇒ Boolean
-
#initialize(options = {}) ⇒ ValidationResult
constructor
A new instance of ValidationResult.
- #success? ⇒ Boolean
- #timestamp_failure? ⇒ Boolean
Constructor Details
#initialize(options = {}) ⇒ ValidationResult
Returns a new instance of ValidationResult.
9 10 11 12 |
# File 'lib/authmac.rb', line 9 def initialize( = {}) @hmac = .fetch(:hmac) @timestamp = .fetch(:timestamp) end |
Instance Method Details
#failure? ⇒ Boolean
18 19 20 |
# File 'lib/authmac.rb', line 18 def failure? !success? end |
#hmac_failure? ⇒ Boolean
22 23 24 |
# File 'lib/authmac.rb', line 22 def hmac_failure? !@hmac end |
#success? ⇒ Boolean
14 15 16 |
# File 'lib/authmac.rb', line 14 def success? @hmac and @timestamp end |
#timestamp_failure? ⇒ Boolean
26 27 28 |
# File 'lib/authmac.rb', line 26 def !@timestamp end |