Okay, so upon further inspection, it appears that there may not be an equivalent function for mod_perls set_handlers().
This leads me to a problem: how do I "turn off" a hook, especially, as the check_user() hook expects the r->user property to contain the username, meaning that the sending of a 403 happens before the check_user() hook is called. Whatever it is I need to do, I need to do in the access() hook. I was hoping it might be something as simple as removing my require entry from the require array. Has anyone had any experience with this? If so, could you comment on techniques? Cheers, Ben -----Original Message----- From: Ben Davies [mailto:bdav...@stickyeyes.com] Sent: 21 July 2009 14:49 To: modules-dev@httpd.apache.org Subject: RE: Dynamicly insert 'require' into request > mod_perl just exposes the API to Perl programmers. Translate their > example > to C and it'll work without mod_perl. Excellent! Just what I was hoping for! Any clues as to the C equivalent of set_handler()? I've been looking in the apache header files and not found anything yet that matches. > You want C, my book takes you > through > developing a custom authentication/authorization handler. I know. I've been doing exactly that :) Great book by the way :) > If I understood your original question ("... conditional > authentication ... if > public access is granted"??) I could perhaps say something more > specific. A quick overview of what I want: if user requests a resource with a particular method, and that method is in a list of public accessible methods, then auth is not required. If not, then authn/authz is required. Simple as. I know there are other ways of doing this with Limit, for example, but my module adds a few bits and bobs to make management a bit easier (and extensible). I would however, appreciate your comments on the subject :) Cheers for confirming, Ben -----Original Message----- From: Nick Kew [mailto:n...@apache.org] Sent: 21 July 2009 14:36 To: modules-dev@httpd.apache.org Subject: Re: Dynamicly insert 'require' into request On 21 Jul 2009, at 13:44, Ben Davies wrote: > I've just found something that does pretty much what I want but with > mod_perl. For an example, see 13.5 in the following chapter > (warning: link > is a PDF) mod_perl just exposes the API to Perl programmers. Translate their example to C and it'll work without mod_perl. You want C, my book takes you through developing a custom authentication/authorization handler. If I understood your original question ("... conditional authentication ... if public access is granted"??) I could perhaps say something more specific. -- Nick Kew