On Wednesday, March 23, 2011 14:24:11 Andrew Green wrote: > I'm putting together a mp2 application where I'd like to trigger > authentication from within a PerlTransHandler, and not from httpd.conf. > > As I understand it, the following should work: > > ----- > > use Apache2::RequestUtil (); > > $r->add_config(['require valid-user']); > > $r->push_handlers(PerlAuthenHandler => 'My::App::Authen'); > $r->push_handlers(PerlAuthzHandler => 'My::App::Authz');
This won't work in a PerlTransHandler because between trans and maptostorage the request configuration made so far is thrown away and reset to the default server config. Move those lines to a PerlMapToStorage handler and it should work assuming that there are no other directives overriding them in .htaccess files or similar. Torsten Förtsch -- Need professional modperl support? Hire me! (http://foertsch.name) Like fantasy? http://kabatinte.net