Reputation: 1448
I user Devise in my rails application to authenticate user. I find two method, "warden.authenticate?" and "user.valid_password?". who can tell me what's difference between those.
Upvotes: 4
Views: 621
Reputation: 4603
Devise is built on top of a library called Warden. Warden is a low-level authentication library for Rack and works as a piece of middleware in the stack. Warden provides the basis for Strategies by implementing a Base strategy from which others must inherit.
The warden method is private, so it's not accessible as an action. It needs to be made a helper method if you intend on accessing it from your views.
Hope this helps.
Upvotes: 4