Class: Htpasswd::Acls::Htdigest
- Inherits:
-
CompositeBase
- Object
- Base
- CompositeBase
- Htpasswd::Acls::Htdigest
- Defined in:
- lib/htpasswd/acls/htdigest.rb
Instance Method Summary collapse
Methods inherited from CompositeBase
Methods inherited from Base
[], #authorize_pass, #authorize_type, #authorize_user, #authorized?, #initialize, #pass, register, #type, #user
Constructor Details
This class inherits a constructor from Htpasswd::Acls::CompositeBase
Instance Method Details
#initialize_composite(options) ⇒ Object
4 5 6 7 8 9 10 11 12 |
# File 'lib/htpasswd/acls/htdigest.rb', line 4 def initialize_composite() IO.foreach([:file]) do |line| user, realm, pass = line.chomp.split(':', 3) self << Acls::Digest.new(:user=>user, :realm=>realm, :pass=>pass) end rescue => err logger.debug("%s: [%s]%s" % [self.class, err.class, err]) raise ConfigurationError, "Cannot read password file. '#{[:file]}'" end |