Class: FTPMVC::Authenticator::Basic

Inherits:
Object
  • Object
show all
Defined in:
lib/ftpmvc/authenticator/basic.rb

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Basic

Returns a new instance of Basic.



4
5
6
# File 'lib/ftpmvc/authenticator/basic.rb', line 4

def initialize(options={})
  @users = options[:users]
end

Instance Method Details

#authenticate(username, password) ⇒ Object



8
9
10
# File 'lib/ftpmvc/authenticator/basic.rb', line 8

def authenticate(username, password)
  @users[username] == password
end