In
CGI::Prototype - let me clarify the response phase for you metaperl identifies authentication and authorization as two general phases of a request; similarly, the very useful book, Writing Apache Modules with Perl and C, focuses a chapter on Apache's API with regards to those two phases of a request. In general I'm rather familiar with the authentication phase of a request, which is standardized for my site (a session object has most of the pertinent information,) and comfortable with Apache::AuthenHandler(s).
However, I'm interested in how (Mod_)Perl Monks approach authorizing users for sites like forums, for which each forum may require different access privileges. Is it bad practice to handle this in the Mod_Perl script (PerlHandler) itself? Is there a standard way to approach this problem using Apache::AuthzHandler(s)? For instance, assuming my forum is located at /forum which approach would you take:
So I guess my question is which approach do
you think I should take? Is there a way to implement the third approach without continuously restarting Apache? While the first approach means that I won’t have to parse the appropriate forum name twice, the second approach seems to be in accordance with separation of concerns (and I could always just set the forum using
$r->subprocess_env or
$r->notes or pnotes. Is the second approach more in tune with Mod_Perl’s designs as a language? What’s your advice?