method
basic_auth
![Some documentation Importance_1](https://d2vfyqvduarcvs.cloudfront.net/images/importance_1.png?1349367920)
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.