Class: DashOverlord::Models::V1::BasicUser
- Includes:
- BCrypt
- Defined in:
- lib/dash_overlord/models/v1/basic_user.rb
Instance Attribute Summary collapse
-
#password ⇒ Object
Returns the value of attribute password.
-
#password_confirmation ⇒ Object
Returns the value of attribute password_confirmation.
Instance Method Summary collapse
- #password_recovery_still_valid? ⇒ Boolean
- #secured_password ⇒ Object
- #secured_password=(new_password) ⇒ Object
Instance Attribute Details
#password ⇒ Object
Returns the value of attribute password.
12 13 14 |
# File 'lib/dash_overlord/models/v1/basic_user.rb', line 12 def password @password end |
#password_confirmation ⇒ Object
Returns the value of attribute password_confirmation.
13 14 15 |
# File 'lib/dash_overlord/models/v1/basic_user.rb', line 13 def password_confirmation @password_confirmation end |
Instance Method Details
#password_recovery_still_valid? ⇒ Boolean
27 28 29 |
# File 'lib/dash_overlord/models/v1/basic_user.rb', line 27 def password_recovery_still_valid? true end |
#secured_password ⇒ Object
15 16 17 18 19 |
# File 'lib/dash_overlord/models/v1/basic_user.rb', line 15 def secured_password return nil unless encrypted_password @password ||= Password.new(encrypted_password) end |
#secured_password=(new_password) ⇒ Object
21 22 23 24 25 |
# File 'lib/dash_overlord/models/v1/basic_user.rb', line 21 def secured_password=(new_password) @password = Password.create(new_password) self.encrypted_password = @password end |