Class: RubySky::Raw::Session
- Inherits:
-
Object
- Object
- RubySky::Raw::Session
- Defined in:
- lib/rubysky/raw/session.rb
Overview
:nodoc:
Instance Attribute Summary collapse
-
#access_jwt ⇒ Object
readonly
Returns the value of attribute access_jwt.
-
#active ⇒ Object
readonly
Returns the value of attribute active.
-
#did_doc ⇒ Object
readonly
Returns the value of attribute did_doc.
-
#email ⇒ Object
readonly
Returns the value of attribute email.
-
#email_auth_factor ⇒ Object
readonly
Returns the value of attribute email_auth_factor.
-
#email_confirmed ⇒ Object
readonly
Returns the value of attribute email_confirmed.
-
#handle ⇒ Object
readonly
Returns the value of attribute handle.
-
#refresh_jwt ⇒ Object
readonly
Returns the value of attribute refresh_jwt.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(refresh_jwt:, access_jwt:, did_doc:, handle:, email:, email_confirmed:, email_auth_factor:, active:, status:) ⇒ Session
constructor
A new instance of Session.
- #update_by_hash(hash) ⇒ Object
Constructor Details
#initialize(refresh_jwt:, access_jwt:, did_doc:, handle:, email:, email_confirmed:, email_auth_factor:, active:, status:) ⇒ Session
Returns a new instance of Session.
9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/rubysky/raw/session.rb', line 9 def initialize(refresh_jwt:, access_jwt:, did_doc:, handle:, email:, email_confirmed:, email_auth_factor:, active:, status:) @refresh_jwt = refresh_jwt @access_jwt = access_jwt @did_doc = did_doc @handle = handle @email = email @email_confirmed = email_confirmed @email_auth_factor = email_auth_factor @active = active @status = status end |
Instance Attribute Details
#access_jwt ⇒ Object (readonly)
Returns the value of attribute access_jwt.
6 7 8 |
# File 'lib/rubysky/raw/session.rb', line 6 def access_jwt @access_jwt end |
#active ⇒ Object (readonly)
Returns the value of attribute active.
6 7 8 |
# File 'lib/rubysky/raw/session.rb', line 6 def active @active end |
#did_doc ⇒ Object (readonly)
Returns the value of attribute did_doc.
6 7 8 |
# File 'lib/rubysky/raw/session.rb', line 6 def did_doc @did_doc end |
#email ⇒ Object (readonly)
Returns the value of attribute email.
6 7 8 |
# File 'lib/rubysky/raw/session.rb', line 6 def email @email end |
#email_auth_factor ⇒ Object (readonly)
Returns the value of attribute email_auth_factor.
6 7 8 |
# File 'lib/rubysky/raw/session.rb', line 6 def email_auth_factor @email_auth_factor end |
#email_confirmed ⇒ Object (readonly)
Returns the value of attribute email_confirmed.
6 7 8 |
# File 'lib/rubysky/raw/session.rb', line 6 def email_confirmed @email_confirmed end |
#handle ⇒ Object (readonly)
Returns the value of attribute handle.
6 7 8 |
# File 'lib/rubysky/raw/session.rb', line 6 def handle @handle end |
#refresh_jwt ⇒ Object (readonly)
Returns the value of attribute refresh_jwt.
6 7 8 |
# File 'lib/rubysky/raw/session.rb', line 6 def refresh_jwt @refresh_jwt end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
6 7 8 |
# File 'lib/rubysky/raw/session.rb', line 6 def status @status end |
Class Method Details
.from_hash(hash) ⇒ Object
22 23 24 25 26 |
# File 'lib/rubysky/raw/session.rb', line 22 def self.from_hash(hash) allocate.tap do |this| this.update_by_hash hash end end |
Instance Method Details
#update_by_hash(hash) ⇒ Object
28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/rubysky/raw/session.rb', line 28 def update_by_hash(hash) @refresh_jwt = hash["refreshJwt"] @access_jwt = hash["accessJwt"] @did_doc = DIDDoc.new(did: hash["did"], did_doc: hash["didDoc"]) @handle = hash["handle"] @email = hash["email"] @email_confirmed = hash["emailConfirmed"] @email_auth_factor = hash["emailAuthFactor"] @active = hash["active"] @status = hash["status"] end |