start

start(&block) Instance Public methods Starts the server and runs the block for each connection. This method does not return until the server is stopped from a signal handler or another thread using stop or shutdown. If the block raises a subclass of StandardError the exception is logged and ignored. If an IOError or Errno::EBADF exception is raised the exception is ignored. If an Exception subclass is raised the exception is logged and re-raised which stops the server. To co

stop

stop() Instance Public methods Stops the server from accepting new connections.

escape

escape(string) Class Public methods Escapes &, â, > and < in string

make_passwd

make_passwd(realm, user, pass) Class Public methods Used by UserDB to create a basic password entry

new

new(config, default=Config::BasicAuth) Class Public methods Creates a new BasicAuth instance. See WEBrick::Config::BasicAuth for default configuration entries You must supply the following configuration entries: :Realm The name of the realm being protected. :UserDB A database of usernames and passwords. A WEBrick::HTTPAuth::Htpasswd instance should be used.

authenticate

authenticate(req, res) Instance Public methods Authenticates a req and returns a 401 Unauthorized using res if the authentication was not correct.

challenge

challenge(req, res) Instance Public methods Returns a challenge response which asks for for authentication information

make_passwd

make_passwd(realm, user, pass) Class Public methods Used by UserDB to create a digest password entry

new

new(config, default=Config::DigestAuth) Class Public methods Creates a new DigestAuth instance. Be sure to use the same DigestAuth instance for multiple requests as it saves state between requests in order to perform authentication. See WEBrick::Config::DigestAuth for default configuration entries You must supply the following configuration entries: :Realm The name of the realm being protected. :UserDB A database of usernames and passwords. A WEBrick::HTTPAuth::Htdigest insta

authenticate

authenticate(req, res) Instance Public methods Authenticates a req and returns a 401 Unauthorized using res if the authentication was not correct.