Module: U2F::RequestBase
- Included in:
- RegisterRequest, SignRequest
- Defined in:
- lib/u2f/request_base.rb
Instance Attribute Summary collapse
-
#app_id ⇒ Object
Returns the value of attribute app_id.
-
#challenge ⇒ Object
Returns the value of attribute challenge.
-
#version ⇒ Object
Returns the value of attribute version.
Instance Method Summary collapse
Instance Attribute Details
#app_id ⇒ Object
Returns the value of attribute app_id.
3 4 5 |
# File 'lib/u2f/request_base.rb', line 3 def app_id @app_id end |
#challenge ⇒ Object
Returns the value of attribute challenge.
3 4 5 |
# File 'lib/u2f/request_base.rb', line 3 def challenge @challenge end |
#version ⇒ Object
Returns the value of attribute version.
3 4 5 |
# File 'lib/u2f/request_base.rb', line 3 def version @version end |
Instance Method Details
#as_json(options = {}) ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/u2f/request_base.rb', line 5 def as_json( = {}) { version: version, challenge: challenge, appId: app_id } end |
#to_json(options = {}) ⇒ Object
13 14 15 |
# File 'lib/u2f/request_base.rb', line 13 def to_json( = {}) ::JSON.pretty_generate(as_json, ) end |