Module: EM::FTPD::FSD::Authentication::Plain
- Defined in:
- lib/em-ftpd-fsd/authentication/plain.rb
Overview
Simple plain authentication
Instance Method Summary collapse
-
#authenticate(user, password) {|Boolean| ... } ⇒ Object
Check if stored username and password validates given user and password.
-
#configure_authentication(opts) ⇒ Object
Configure the authentication module.
Instance Method Details
#authenticate(user, password) {|Boolean| ... } ⇒ Object
Check if stored username and password validates given user and password
39 40 41 |
# File 'lib/em-ftpd-fsd/authentication/plain.rb', line 39 def authenticate( user, password, &block ) yield ( @auth_user == user && @auth_password == password ) end |
#configure_authentication(opts) ⇒ Object
Configure the authentication module
30 31 32 33 |
# File 'lib/em-ftpd-fsd/authentication/plain.rb', line 30 def configure_authentication( opts ) @auth_user = opts[:user] @auth_password = opts[:password] end |