method

authenticate

ruby latest stable - Class: WEBrick::HTTPAuth::BasicAuth
authenticate(req, res)
public

Authenticates a req and returns a 401 Unauthorized using res if the authentication was not correct.