Type:
Class
Constants:
AuthScheme : "Digest"
OpaqueInfo : Struct.new(:time, :nonce, :nc)

Struct containing the opaque portion of the digest authentication

RFC 2617 Digest Access Authentication for WEBrick

Use this class to add digest authentication to a WEBrick servlet.

Here is an example of how to set up DigestAuth:

config = { :Realm => 'DigestAuth example realm' }

htdigest = WEBrick::HTTPAuth::Htdigest.new 'my_password_file'
htdigest.set_passwd config[:Realm], 'username', 'password'
htdigest.flush

config[:UserDB] = htdigest

digest_auth = WEBrick::HTTPAuth::DigestAuth.new config

When using this as with a servlet be sure not to create a new DigestAuth object in the servlet's initialize. By default WEBrick creates a new servlet instance for every request and the DigestAuth object must be used across requests.

make_passwd

make_passwd(realm, user, pass) Class Public methods Used by

2015-06-11 14:54:13
new

new(config, default=Config::DigestAuth) Class Public methods Creates a new

2015-06-11 14:56:37
challenge

challenge(req, res, stale=false) Instance Public methods Returns a challenge

2015-06-11 15:02:52
authenticate

authenticate(req, res) Instance Public methods Authenticates a req

2015-06-11 15:00:52