validate_basic_auth
validate_basic_auth
Validate a username/password pair against the agent’s configured Basic Auth
credentials. The comparison uses constant-time hmac.compare_digest to prevent
timing attacks.
This method is an override point. Subclasses can replace it with custom
authentication logic (e.g., database lookups, external identity providers) while
the rest of the auth pipeline (_check_basic_auth, _check_cgi_auth, etc.)
continues to call it transparently.
Parameters
username
Username extracted from the incoming request’s Authorization header.
password
Password extracted from the incoming request’s Authorization header.
Returns
bool — True if the credentials are valid, False otherwise. Returns False
when no credentials have been configured on the agent.