Class: Merb::Authentication::Strategies::Basic::Form
- Inherits:
-
Base
- Object
- Merb::Authentication::Strategy
- Base
- Merb::Authentication::Strategies::Basic::Form
- Defined in:
- lib/merb-auth-more/strategies/basic/password_form.rb
Instance Method Summary collapse
Methods inherited from Base
#login_param, login_param, password_param, #password_param
Instance Method Details
#run! ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/merb-auth-more/strategies/basic/password_form.rb', line 19 def run! if (login = request.params[login_param]) && (password = request.params[password_param]) user = user_class.authenticate(login, password) if !user errors = request.session.authentication.errors errors.clear! errors.add(login_param, ) end user end end |
#strategy_error_message ⇒ Object
run!
31 32 33 |
# File 'lib/merb-auth-more/strategies/basic/password_form.rb', line 31 def "#{login_param.to_s.capitalize} or #{password_param.to_s.capitalize} were incorrect" end |