v2_1_10 -
Show latest stable
- Superclass: Object
Basic Authentication for WEBrick
Use this class to add basic authentication to a WEBrick servlet.
Here is an example of how to set up a BasicAuth:
config = { :Realm => 'BasicAuth example realm' } htpasswd = WEBrick::HTTPAuth::Htpasswd.new 'my_password_file' htpasswd.set_passwd config[:Realm], 'username', 'password' htpasswd.flush config[:UserDB] = htpasswd basic_auth = WEBrick::HTTPAuth::BasicAuth.new config
Included modules
- WEBrick::HTTPAuth::Authenticator
Constants
AuthScheme = "Basic"
Attributes
| [R] | logger |
| [R] | realm |
| [R] | userdb |
Files
- lib/webrick/httpauth/basicauth.rb