1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- class Auth
- class Backend
- class Internal < Auth::Backend::Base
- private
-
-
-
- def authenticated?
- return true if hash_matches?
- auth.increase_login_failed_attempts = true
- false
- end
-
-
-
- def perform?
- return false if !user.verified && user.source == 'signup'
- user.password.present?
- end
- def hash_matches?
-
-
- if !PasswordPolicy::MaxLength.valid? password
- return false
- end
-
-
- if PasswordHash.legacy?(user.password, password)
- user.update!(password: password)
- return true
- end
- PasswordHash.verified?(user.password, password)
- end
- end
- end
- end
|