method

authenticate

authenticate(req, res)
public

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