geoff 2003/02/19 06:12:02
Modified: . Changes
xs/maps apache_structures.map
t/response/TestAPI request_rec.pm
src/docs/2.0/user/handlers http.pod
Log:
Open up r->ap_auth_type, making it possible to write custom
authen handlers that don't rely on Basic authentication or
it's associated ap_* functions.
Submitted by: geoff
Reviewed by: stas
Revision Changes Path
1.128 +5 -0 modperl-2.0/Changes
Index: Changes
===================================================================
RCS file: /home/cvs/modperl-2.0/Changes,v
retrieving revision 1.127
retrieving revision 1.128
diff -u -r1.127 -r1.128
--- Changes 19 Feb 2003 00:32:45 -0000 1.127
+++ Changes 19 Feb 2003 14:12:01 -0000 1.128
@@ -10,6 +10,11 @@
=item 1.99_09-dev
+Open up r->ap_auth_type, making it possible to write custom
+authen handlers that don't rely on Basic authentication or
+it's associated ap_* functions.
+[Geoffrey Young]
+
add Apache::Bundle2 [Stas]
Apache::Reload now supports the PerlPreConnectionHandler invocation
1.19 +1 -1 modperl-2.0/xs/maps/apache_structures.map
Index: apache_structures.map
===================================================================
RCS file: /home/cvs/modperl-2.0/xs/maps/apache_structures.map,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- apache_structures.map 12 Jan 2003 02:31:54 -0000 1.18
+++ apache_structures.map 19 Feb 2003 14:12:02 -0000 1.19
@@ -46,7 +46,7 @@
content_languages
> vlist_validator
user
-- ap_auth_type #should use ap_auth_type function instead
+ ap_auth_type
~ no_cache
no_local_copy
unparsed_uri
1.16 +3 -1 modperl-2.0/t/response/TestAPI/request_rec.pm
Index: request_rec.pm
===================================================================
RCS file: /home/cvs/modperl-2.0/t/response/TestAPI/request_rec.pm,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- request_rec.pm 11 Apr 2002 11:08:43 -0000 1.15
+++ request_rec.pm 19 Feb 2003 14:12:02 -0000 1.16
@@ -19,7 +19,7 @@
sub handler {
my $r = shift;
- plan $r, tests => 41;
+ plan $r, tests => 42;
#Apache->request($r); #PerlOptions +GlobalRequest takes care
my $gr = Apache->request;
@@ -96,6 +96,8 @@
#content_languages
#user
+
+ ok $r->ap_auth_type || 1;
ok $r->no_cache || 1;
1.15 +17 -0 modperl-docs/src/docs/2.0/user/handlers/http.pod
Index: http.pod
===================================================================
RCS file: /home/cvs/modperl-docs/src/docs/2.0/user/handlers/http.pod,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- http.pod 18 Feb 2003 05:33:23 -0000 1.14
+++ http.pod 19 Feb 2003 14:12:02 -0000 1.15
@@ -644,6 +644,23 @@
this situation for us, which will usually challenge the client so
it'll supply the credentials.
+Note that get_basic_auth_pw() does a few things behind the scenes,
+which are important to understand if you plan on implementing your
+own authentication mechanism that does not use get_basic_auth_pw().
+First, is checks the value of the configured AuthType for the
+request, making sure it is 'Basic'. Then it makes sure that the
+Authorization (or Proxy-Authorization) header is formatted for
+Basic authentication. Finally, after isolating the user and password
+from the header, it populates the ap_auth_type slot in the request
+record with 'Basic'. For the first and last parts of this process,
+mod_perl offers an API. $r->auth_type returns the configured
+authentication type for the current request - whatever was set
+via the AuthType configuration directive. $r->ap_auth_type populates
+the ap_auth_type slot in the request record, which should be done
+after it has been confirmed that the request is indeed using Basic
+authentication. $r->ap_auth_type was $r->connection->auth_type in
+mod_perl 1.0.
+
Once we know that we have the username and the password supplied by
the client, we can proceed with the authentication. Our authentication
algorithm is unusual. Instead of validating the username/password pair
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]