validateBasicAuth
Check a request’s basic-auth credentials. Every route that requires basic auth
calls it. The default compares them with the agent’s credentials in constant time
and returns false when the agent has no credentials. Override it to check
credentials another way, such as a database lookup or an external identity
provider.
An override replaces the comparison. Call super.validateBasicAuth() to keep it.
Parameters
username
Username extracted from the incoming request’s Authorization header.
password
Password extracted from the incoming request’s Authorization header.
Returns
boolean | Promise<boolean> — true if the credentials are valid, false to
reject the request.