method
basic_auth
v2_4_6 -
Show latest stable
- Class:
WEBrick::HTTPAuth
basic_auth(req, res, realm)public
Simple wrapper for providing basic authentication for a request. When called with a request req, response res, authentication realm and block the block will be called with a username and password. If the block returns true the request is allowed to continue, otherwise an HTTPStatus::Unauthorized error is raised.