Module: StupidAuth::Model::InstanceMethods
- Defined in:
- lib/stupid_auth/model.rb
Instance Method Summary collapse
-
#authenticated_by?(provided_password) ⇒ Boolean
Compare provided password with the one stored in the database.
Instance Method Details
#authenticated_by?(provided_password) ⇒ Boolean
Compare provided password with the one stored in the database
42 43 44 |
# File 'lib/stupid_auth/model.rb', line 42 def authenticated_by? provided_password encrypted_password == Digest::SHA1.hexdigest(provided_password + password_salt) end |