httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ilya Volynets <>
Subject Re: [Re: Authorisation realms: "newbie" question]
Date Mon, 03 Apr 2000 13:33:42 GMT
> I don't quite understand. What is the specific user functionality you
> want to add? 
> You naturally have to know the realm before sending the 401 error code
> to the user. So I guess you want to set the realm based on specifics
> of the user's request other than directory and file? This sounds
> useful.
Exactly. I want to be able to set Auth realm from within my module. 
> It doesn't look like this possible using existing APIs, but you could
> probably just take the functions used to verify passwords in
> http_protocol.c or mod_auth_digest, and put modified versions in your
> module.
Wouldn't it be better to put something like 

API_EXPORT(int) ap_set_auth_name(request_rec *r,const char *realm)
    core_dir_config *conf;

    conf = (core_dir_config *)ap_get_module_config(r->per_dir_config,
    return 1;//conf->ap_auth_name;

in http_core?
Besides mod_auth and mod_digest still use ap_auth_name, and
ap_note_basic_auth_failure. Duplicating all of those in every module
that wants to get auth realm from place other then .htaccess doesn't
sound right to me. Similar considerations may apply to other data, for
which we have accessor hunctions in http_core.

\  /|_|  ||  |_|\  /
 \/   |__||__|   \/

 /\             /\
/  \___________/  \
   |  |  |  |  |

Get free email and a permanent address at

View raw message