Class: ZeroRailsAdapter::Identity
- Inherits:
-
Data
- Object
- Data
- ZeroRailsAdapter::Identity
- Defined in:
- lib/zero_rails_adapter/identity.rb
Instance Attribute Summary collapse
-
#claims ⇒ Object
readonly
Returns the value of attribute claims.
-
#current_user ⇒ Object
readonly
Returns the value of attribute current_user.
-
#user_id ⇒ Object
readonly
Returns the value of attribute user_id.
Instance Method Summary collapse
-
#initialize(user_id: nil, current_user: nil, claims: {}) ⇒ Identity
constructor
A new instance of Identity.
Constructor Details
#initialize(user_id: nil, current_user: nil, claims: {}) ⇒ Identity
Returns a new instance of Identity.
5 6 7 |
# File 'lib/zero_rails_adapter/identity.rb', line 5 def initialize(user_id: nil, current_user: nil, claims: {}) super(user_id: user_id&.to_s, current_user:, claims: claims || {}) end |
Instance Attribute Details
#claims ⇒ Object (readonly)
Returns the value of attribute claims
4 5 6 |
# File 'lib/zero_rails_adapter/identity.rb', line 4 def claims @claims end |
#current_user ⇒ Object (readonly)
Returns the value of attribute current_user
4 5 6 |
# File 'lib/zero_rails_adapter/identity.rb', line 4 def current_user @current_user end |
#user_id ⇒ Object (readonly)
Returns the value of attribute user_id
4 5 6 |
# File 'lib/zero_rails_adapter/identity.rb', line 4 def user_id @user_id end |