Class: WorkOS::VerifyChallenge
- Inherits:
-
Object
- Object
- WorkOS::VerifyChallenge
- Includes:
- HashProvider
- Defined in:
- lib/workos/verify_challenge.rb
Overview
The VerifyChallenge class provides a lightweight wrapper around a WorkOS Authentication Challenge resource.
Instance Attribute Summary collapse
-
#challenge ⇒ Object
Returns the value of attribute challenge.
-
#valid ⇒ Object
Returns the value of attribute valid.
Instance Method Summary collapse
-
#initialize(json) ⇒ VerifyChallenge
constructor
A new instance of VerifyChallenge.
- #to_json ⇒ Object
Methods included from HashProvider
Constructor Details
#initialize(json) ⇒ VerifyChallenge
Returns a new instance of VerifyChallenge.
11 12 13 14 15 16 |
# File 'lib/workos/verify_challenge.rb', line 11 def initialize(json) hash = JSON.parse(json, symbolize_names: true) @challenge = hash[:challenge] @valid = hash[:valid] end |
Instance Attribute Details
#challenge ⇒ Object
Returns the value of attribute challenge.
9 10 11 |
# File 'lib/workos/verify_challenge.rb', line 9 def challenge @challenge end |
#valid ⇒ Object
Returns the value of attribute valid.
9 10 11 |
# File 'lib/workos/verify_challenge.rb', line 9 def valid @valid end |
Instance Method Details
#to_json ⇒ Object
18 19 20 21 22 23 |
# File 'lib/workos/verify_challenge.rb', line 18 def to_json(*) { challenge: challenge, valid: valid, } end |