mirror of
https://github.com/heartcombo/devise.git
synced 2022-11-09 12:18:31 -05:00
Be sure to halt on failures, closes #856
This commit is contained in:
parent
43a3431c3e
commit
392e664036
5 changed files with 5 additions and 3 deletions
|
@ -16,6 +16,7 @@
|
|||
* Custom failure apps no longer ignored in test mode (by github.com/jaghion)
|
||||
* Do not depend on ActiveModel::Dirty
|
||||
* Manual sign_in now triggers remember token
|
||||
* Be sure to halt strategies on failures
|
||||
|
||||
* deprecations
|
||||
* Deprecated anybody_signed_in? in favor of signed_in? (by github.com/gavinhughes)
|
||||
|
|
|
@ -21,6 +21,7 @@ module Devise
|
|||
case result
|
||||
when String, Symbol
|
||||
fail!(result)
|
||||
false
|
||||
when TrueClass
|
||||
decorate(resource)
|
||||
true
|
||||
|
|
|
@ -10,7 +10,7 @@ module Devise
|
|||
if validate(resource){ resource.valid_password?(password) }
|
||||
resource.after_database_authentication
|
||||
success!(resource)
|
||||
else
|
||||
elsif !halted?
|
||||
fail(:invalid)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -20,7 +20,7 @@ module Devise
|
|||
|
||||
if validate(resource)
|
||||
success!(resource)
|
||||
else
|
||||
elsif !halted?
|
||||
cookies.delete(remember_key)
|
||||
pass
|
||||
end
|
||||
|
|
|
@ -20,7 +20,7 @@ module Devise
|
|||
if validate(resource)
|
||||
resource.after_token_authentication
|
||||
success!(resource)
|
||||
else
|
||||
elsif !halted?
|
||||
fail(:invalid_token)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue