performBasicAuth

Enforces HTTP Basic Auth authentication on the given req/res pair.

Parameters

req HTTPServerRequest

Request object that is to be checked

res HTTPServerResponse

Response object that will be used for authentication errors

realm string

HTTP Basic Auth realm reported to the client

pwcheck PasswordVerifyCallback

A delegate queried for validating user/password pairs

Return Value

Type: string

Returns the name of the authenticated user.

Throws

Throws a HTTPStatusExeption in case of an authentication failure.

Meta