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.
Digest
authentication for proxy servers. See DigestAuth
for details.
Htpasswd
accesses apache-compatible password files. Passwords are matched to a realm where they are valid. For security, the path for a password database should be stored outside of the paths available to the HTTP server.
Htpasswd
is intended for use with WEBrick::HTTPAuth::BasicAuth
.
To create an Htpasswd
database with a single user:
htpasswd = WEBrick::HTTPAuth::Htpasswd.new 'my_password_file' htpasswd.set_passwd 'my realm', 'username', 'password' htpasswd.flush
Root of the HTTP status class hierarchy
Stores multipart form data. FormData
objects are created when WEBrick::HTTPUtils.parse_form_data
is called.
An object representation of a stack frame, initialized by Kernel#caller_locations
.
For example:
# caller_locations.rb def a(skip) caller_locations(skip) end def b(skip) a(skip) end def c(skip) b(skip) end c(0..2).map do |call| puts call.to_s end
Running ruby caller_locations.rb
will produce:
caller_locations.rb:2:in `a' caller_locations.rb:5:in `b' caller_locations.rb:8:in `c'
Here’s another example with a slightly different result:
# foo.rb class Foo attr_accessor :locations def initialize(skip) @locations = caller_locations(skip) end end Foo.new(0..2).locations.map do |call| puts call.to_s end
Now run ruby foo.rb
and you should see:
init.rb:4:in `initialize' init.rb:8:in `new' init.rb:8:in `<main>'
Common validators of number and nz_number types
Element
used to describe an Atom
date and time in the ISO 8601 format
Examples:
2013-03-04T15:30:02Z
2013-03-04T10:30:02-05:00
@!visibility private @see DependencyGraph#detach_vertex_named
Indicates some other unhandled resolver error was encountered.