Class: SimpleAuthentication::PasswordAuthenticator
- Inherits:
-
Authenticator
- Object
- Authenticator
- SimpleAuthentication::PasswordAuthenticator
- Defined in:
- lib/simple_password_authentication/password_authenticator.rb
Instance Method Summary collapse
Instance Method Details
#authenticate ⇒ Object
12 13 14 |
# File 'lib/simple_password_authentication/password_authenticator.rb', line 12 def authenticate User.authenticate(params[:username], params[:password]) end |
#authentication_possible? ⇒ Boolean
7 8 9 |
# File 'lib/simple_password_authentication/password_authenticator.rb', line 7 def authentication_possible? !params.values_at(:username, :password).any?{|v| v.blank? } end |