diff options
author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-05-10 23:37:43 +0000 |
---|---|---|
committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-05-10 23:37:43 +0000 |
commit | 8c2a52937f3b71efa7bcb48e7b8b00bc6b616ab4 (patch) | |
tree | 757bcc2a71bbb2338e5ccc11a0f37e2424132e0c /lib/webrick/httpauth/userdb.rb | |
parent | 6626b0a2c567669cceebd3bfd0195b0ffd8c97c3 (diff) | |
download | ruby-8c2a52937f3b71efa7bcb48e7b8b00bc6b616ab4.tar.gz |
* lib/webrick: Add documentation for WEBrick::HTTPAuth
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31505 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/webrick/httpauth/userdb.rb')
-rw-r--r-- | lib/webrick/httpauth/userdb.rb | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/lib/webrick/httpauth/userdb.rb b/lib/webrick/httpauth/userdb.rb index 95834f36e3..005c18dfd0 100644 --- a/lib/webrick/httpauth/userdb.rb +++ b/lib/webrick/httpauth/userdb.rb @@ -9,19 +9,42 @@ module WEBrick module HTTPAuth + + ## + # User database mixin for HTTPAuth. This mixin dispatches user record + # access to the underlying auth_type for this database. + module UserDB - attr_accessor :auth_type # BasicAuth or DigestAuth + + ## + # The authentication type. + # + # WEBrick::HTTPAuth::BasicAuth or WEBrick::HTTPAuth::DigestAuth are + # built-in. + + attr_accessor :auth_type + + ## + # Creates an obscured password in +realm+ with +user+ and +password+ + # using the auth_type of this database. def make_passwd(realm, user, pass) @auth_type::make_passwd(realm, user, pass) end + ## + # Sets a password in +realm+ with +user+ and +password+ for the + # auth_type of this database. + def set_passwd(realm, user, pass) self[user] = pass end + ## + # Retrieves a password in +realm+ for +user+ for the auth_type of this + # database. +reload_db+ is a dummy value. + def get_passwd(realm, user, reload_db=false) - # reload_db is dummy make_passwd(realm, user, self[user]) end end |