Module: MiniAuth
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/mini_auth.rb,
lib/mini_auth/version.rb,
lib/mini_auth/random_token.rb
Defined Under Namespace
Modules: ClassMethods, RandomToken
Constant Summary
collapse
- BASIC_ATTRIBUTES =
[
:password, :password_confirmation,
:current_password,
:new_password, :new_password_confirmation
]
- VERSION =
"1.0.0"
Instance Method Summary
collapse
Instance Method Details
#authenticate(raw_password) ⇒ Object
51
52
53
54
55
56
57
|
# File 'lib/mini_auth.rb', line 51
def authenticate(raw_password)
if password_digest && BCrypt::Password.new(password_digest) == raw_password
self
else
false
end
end
|
#changing_password? ⇒ Boolean
59
60
61
|
# File 'lib/mini_auth.rb', line 59
def changing_password?
!!changing_password
end
|
#setting_password? ⇒ Boolean
63
64
65
|
# File 'lib/mini_auth.rb', line 63
def setting_password?
!!setting_password
end
|