]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Add the auth provider name as a note in the request so that authn_provider_alias...
authorBradley Nicholes <bnicholes@apache.org>
Mon, 23 May 2005 23:07:49 +0000 (23:07 +0000)
committerBradley Nicholes <bnicholes@apache.org>
Mon, 23 May 2005 23:07:49 +0000 (23:07 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@178052 13f79535-47bb-0310-9956-ffa450edef68

modules/aaa/mod_auth.h
modules/aaa/mod_auth_basic.c
modules/aaa/mod_auth_digest.c

index fcc172ee712bdc8fbf2d38547d7a943a34d9d396..7595f8b393493d3b32d4eaa8d66b220908a2ee71 100644 (file)
@@ -30,6 +30,7 @@ extern "C" {
 #define AUTHN_DEFAULT_PROVIDER "file"
     
 #define AUTHZ_GROUP_NOTE "authz_group_note"
+#define AUTHN_PROVIDER_NAME_NOTE "authn_provider_name"
 
 typedef enum {
     AUTH_DENIED,
index fc27b71a16f65c98ba806f9c35e74113de7a5f3e..b4b48a6f216e199e89b264d8db6101b9f8006950 100644 (file)
@@ -237,8 +237,12 @@ static int authenticate_basic_user(request_rec *r)
             provider = current_provider->provider;
         }
 
+        apr_table_setn(r->notes, AUTHN_PROVIDER_NAME_NOTE, current_provider->provider_name);
+
         auth_result = provider->check_password(r, sent_user, sent_pw);
 
+        apr_table_unset(r->notes, AUTHN_PROVIDER_NAME_NOTE);
+
         /* Something occured. Stop checking. */
         if (auth_result != AUTH_USER_NOT_FOUND) {
             break;
index 2e02f38b0527c14638a6f5c6ee2cf3cc8cfb3e13..7edf320183627f4c3b0946d05ce6377e55fa84a7 100644 (file)
@@ -1358,10 +1358,14 @@ static authn_status get_hash(request_rec *r, const char *user,
             provider = current_provider->provider;
         }
 
+        apr_table_setn(r->notes, AUTHN_PROVIDER_NAME_NOTE, current_provider->provider_name);
+
         /* We expect the password to be md5 hash of user:realm:password */
         auth_result = provider->get_realm_hash(r, user, conf->realm,
                                                &password);
 
+        apr_table_unset(r->notes, AUTHN_PROVIDER_NAME_NOTE);
+
         /* Something occured.  Stop checking. */
         if (auth_result != AUTH_USER_NOT_FOUND) {
             break;