HTTPAuth
provides both basic and digest authentication.
To enable authentication for requests in WEBrick
you will need a user database and an authenticator. To start, here’s an Htpasswd
database for use with a DigestAuth
authenticator:
config = { :Realm => 'DigestAuth example realm' } htpasswd = WEBrick::HTTPAuth::Htpasswd.new 'my_password_file' htpasswd.auth_type = WEBrick::HTTPAuth::DigestAuth htpasswd.set_passwd config[:Realm], 'username', 'password' htpasswd.flush
The :Realm
is used to provide different access to different groups across several resources on a server. Typically you’ll need only one realm for a server.
This database can be used to create an authenticator:
config[:UserDB] = htpasswd digest_auth = WEBrick::HTTPAuth::DigestAuth.new config
To authenticate a request call authenticate with a request and response object in a servlet:
def do_GET req, res @authenticator.authenticate req, res end
For digest authentication the authenticator must not be created every request, it must be passed in as an option via WEBrick::HTTPServer#mount
.
Provides information about specifcations and dependencies to the resolver, allowing the {Resolver} class to remain generic while still providing power and flexibility.
This module contains the methods that users of Gem::Resolver::Molinillo
must to implement, using knowledge of their own model classes.
TextConstruct
that conveys a description or subtitle for a Feed
.
Reference: validator.w3.org/feed/docs/rfc4287.html#element.subtitle
TextConstruct
that conveys a description or title for a Feed
or Entry
.
Reference: validator.w3.org/feed/docs/rfc4287.html#element.title
An error caused by conflicts in version
An SSLContext
is used to set various options regarding certificates, algorithms, verification, session caching, etc. The SSLContext
is used to create an SSLSocket
.
All attributes must be set before creating an SSLSocket
as the SSLContext
will be frozen afterward.
A StoreContext
is used while validating a single certificate and holds the status involved.
An OpenSSL::OCSP::Response
contains the status of a certificate check which is created from an OpenSSL::OCSP::Request
.
An OpenSSL::OCSP::BasicResponse
contains the status of a certificate check which is created from an OpenSSL::OCSP::Request
. A BasicResponse
is more detailed than a Response
.
An OpenSSL::OCSP::SingleResponse
represents an OCSP
SingleResponse
structure, which contains the basic information of the status of the certificate.
This class represents a YAML Scalar.
This node type is a terminal node and should not have any children.
SSLConfig
handles the needed SSL information for establishing a DRbSSLSocket
connection, including generating the X509 / RSA pair.
An instance of this config can be passed to DRbSSLSocket.new
, DRbSSLSocket.open
and DRbSSLSocket.open_server
See DRb::DRbSSLSocket::SSLConfig.new
for more details
See Net::HTTPGenericRequest
for attributes and methods.
See Net::HTTPGenericRequest
for attributes and methods.