in c-modules/authany/mod_authany.c [117:152]
static int authany_handler(request_rec *r)
{
const char *sent_pw;
int rc = ap_get_basic_auth_pw(r, &sent_pw);
char *user;
if (rc != OK) {
return rc;
}
if (require_any_user(r) != OK) {
return DECLINED;
}
#ifdef APACHE1
user = r->connection->user;
#endif
#ifdef APACHE2
user = r->user;
#endif
if (!(strtrue(user) && strtrue(sent_pw))) {
ap_note_basic_auth_failure(r);
#ifdef APACHE1
ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r,
"Both a username and password must be provided");
#endif
#ifdef APACHE2
ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
"Both a username and password must be provided");
#endif
return HTTP_UNAUTHORIZED;
}
return OK;
}