Commit 7d3fa1ec authored by Bradley Nicholes's avatar Bradley Nicholes
Browse files

Add the auth provider name as a note in the request so that...

Add the auth provider name as a note in the request so that authn_provider_alias is able to look up the original provider along with the per_dir configuration.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@178052 13f79535-47bb-0310-9956-ffa450edef68
parent 00b53217
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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,
+4 −0
Original line number Diff line number Diff line
@@ -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;
+4 −0
Original line number Diff line number Diff line
@@ -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;