Class: Yubikey::OTP::Verify
- Inherits:
-
Object
- Object
- Yubikey::OTP::Verify
- Defined in:
- lib/yubikey/otp_verify.rb
Instance Attribute Summary collapse
-
#status ⇒ Object
readonly
The raw status from the Yubico server.
Instance Method Summary collapse
-
#initialize(otp) ⇒ Verify
constructor
A new instance of Verify.
- #replayed? ⇒ Boolean
- #valid? ⇒ Boolean
Constructor Details
Instance Attribute Details
#status ⇒ Object (readonly)
The raw status from the Yubico server
10 11 12 |
# File 'lib/yubikey/otp_verify.rb', line 10 def status @status end |
Instance Method Details
#replayed? ⇒ Boolean
20 21 22 |
# File 'lib/yubikey/otp_verify.rb', line 20 def replayed? @status == 'REPLAYED_OTP' end |
#valid? ⇒ Boolean
16 17 18 |
# File 'lib/yubikey/otp_verify.rb', line 16 def valid? @status == 'OK' end |