Class: Insika::TokenStore::Record
- Inherits:
-
Data
- Object
- Data
- Insika::TokenStore::Record
- Defined in:
- lib/insika/token_store.rb
Instance Attribute Summary collapse
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#label ⇒ Object
readonly
Returns the value of attribute label.
-
#revoked_at ⇒ Object
readonly
Returns the value of attribute revoked_at.
-
#role ⇒ Object
readonly
Returns the value of attribute role.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#tenant_id ⇒ Object
readonly
Returns the value of attribute tenant_id.
-
#token_hash ⇒ Object
readonly
Returns the value of attribute token_hash.
Instance Method Summary collapse
Instance Attribute Details
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at
24 25 26 |
# File 'lib/insika/token_store.rb', line 24 def created_at @created_at end |
#id ⇒ Object (readonly)
Returns the value of attribute id
24 25 26 |
# File 'lib/insika/token_store.rb', line 24 def id @id end |
#label ⇒ Object (readonly)
Returns the value of attribute label
24 25 26 |
# File 'lib/insika/token_store.rb', line 24 def label @label end |
#revoked_at ⇒ Object (readonly)
Returns the value of attribute revoked_at
24 25 26 |
# File 'lib/insika/token_store.rb', line 24 def revoked_at @revoked_at end |
#role ⇒ Object (readonly)
Returns the value of attribute role
24 25 26 |
# File 'lib/insika/token_store.rb', line 24 def role @role end |
#status ⇒ Object (readonly)
Returns the value of attribute status
24 25 26 |
# File 'lib/insika/token_store.rb', line 24 def status @status end |
#tenant_id ⇒ Object (readonly)
Returns the value of attribute tenant_id
24 25 26 |
# File 'lib/insika/token_store.rb', line 24 def tenant_id @tenant_id end |
#token_hash ⇒ Object (readonly)
Returns the value of attribute token_hash
24 25 26 |
# File 'lib/insika/token_store.rb', line 24 def token_hash @token_hash end |
Instance Method Details
#active? ⇒ Boolean
26 |
# File 'lib/insika/token_store.rb', line 26 def active? = status.to_s == "active" |
#tenant? ⇒ Boolean
27 |
# File 'lib/insika/token_store.rb', line 27 def tenant? = role.to_s == "tenant" |
#to_h ⇒ Object
28 29 30 31 |
# File 'lib/insika/token_store.rb', line 28 def to_h { id: id, role: role, tenant_id: tenant_id, label: label, status: status, created_at: created_at, revoked_at: revoked_at } end |