Htdigest accesses apache-compatible digest password files. Passwords are matched to a realm where they are valid. For security, the path for a digest password database should be stored outside of the paths available to the HTTP server.

Htdigest is intended for use with WEBrick::HTTPAuth::DigestAuth and stores passwords using cryptographic hashes.

htpasswd = WEBrick::HTTPAuth::Htdigest.new 'my_password_file'
htpasswd.set_passwd 'my realm', 'username', 'password'
htpasswd.flush
Class Methods

Open a digest password database at path

Instance Methods

Removes a password from the database for user in realm.

Iterate passwords in the database.

Flush the password database. If output is given the database will be written there instead of to the original path.

Retrieves a password from the database for user in realm. If reload_db is true the database will be reloaded first.

Reloads passwords from the database

Sets a password in the database for user in realm to pass.