module EM::FTPD::FSD::Authentication::Plain

Simple plain authentication

Public Instance Methods

authenticate( user, password ) { |auth_user == user && auth_password == password| ... } click to toggle source

Check if stored username and password validates given user and password @param [String] user Username @param [String] password Password @yield [Boolean] True if username and password are correct

# 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 ) click to toggle source

Configure the authentication module @param [Hash] opts @option opts user Username @option opts password Password

# File lib/em-ftpd-fsd/authentication/plain.rb, line 30
def configure_authentication( opts )
  @auth_user     = opts[:user]
  @auth_password = opts[:password]
end