1
0
mirror of https://github.com/apache/httpd.git synced 2025-11-08 04:22:21 +03:00

Introduce note_auth_failure hook to allow modules to add support

for additional auth types. This makes ap_note_auth_failure() work with
mod_auth_digest again.

PR: 48807


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@960399 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Stefan Fritsch
2010-07-04 21:16:53 +00:00
parent a52fa4db6d
commit eedf130332
8 changed files with 88 additions and 38 deletions

View File

@@ -127,6 +127,15 @@ static void note_basic_auth_failure(request_rec *r)
"\"", NULL));
}
static int hook_note_basic_auth_failure(request_rec *r, const char *auth_type)
{
if (strcasecmp(auth_type, "Basic"))
return DECLINED;
note_basic_auth_failure(r);
return OK;
}
static int get_basic_auth(request_rec *r, const char **user,
const char **pw)
{
@@ -290,6 +299,8 @@ static void register_hooks(apr_pool_t *p)
{
ap_hook_check_authn(authenticate_basic_user, NULL, NULL, APR_HOOK_MIDDLE,
AP_AUTH_INTERNAL_PER_CONF);
ap_hook_note_auth_failure(hook_note_basic_auth_failure, NULL, NULL,
APR_HOOK_MIDDLE);
}
AP_DECLARE_MODULE(auth_basic) =