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:
@@ -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) =
|
||||
|
||||
Reference in New Issue
Block a user