validateBasicAuth
Validate a supplied username/password pair against the service’s configured
Basic Auth credentials using a constant-time comparison, so the secret is not
leaked through timing. Returns false when no credentials are configured.
Parameters
username
Username to compare against the configured credentials.
password
Password to compare against the configured credentials.
Returns
boolean | Promise<boolean> — true when both values match the configured
credentials; false when they do not match or no credentials are set.
Example
Retrieve the configured credentials with
getBasicAuthCredentials().