Re: $r->requires and register_auth_provider

Sergei Gerasenko <[email protected]>
Newsgroups gmane.comp.apache.mod-perl
Message-ID <CADM1pVw=BO2C+yYnJsz29ZmaW=BWEoFT-z9sjQN3U6081dqD1Q@mail.gmail.com>
Hi André,

This is definitely going to be helpful. I was considering just accessing
the raw config values, but could only find dir_config that remotely
resembled what I needed.
I ended up introducing a custom directive, but that's clunky in my opinion.
So, Apache2::Directive is already a big improvement. Also, if the hanlding
of 'requires' is so simple
as AuthCookie shows, that would be terrific. I will be back with an update
if I'm successful.

Thanks a ton!!

On Tue, Dec 22, 2015 at 2:19 AM, André Warnier <[email protected]> wrote:

> Hi.
>
> I don't have anything very precise to tell you, but here is what I know :
> The AAA part has been significantly changed in Apache httpd 2.4, as
> compared to 2.2.
> Therefore I suspect - but I am not sure - that some corresponding changes
> had to be made in mod_perl, to adapt to these changes.
> One of the changes that I see when looking at the Apache 2.4 vs 2.2
> on-line documentation (for Apache, not for mod_perl), concerns the syntax -
> and who handles - the "Require" directives.
>
> I also believe that the on-line mod_perl documentation does not yet
> reflect these changes, and it seems a bit hard to find an up-to-date
> documentation yet.
>
> But anyway, I just found this on CPAN :
>
> https://metacpan.org/source/MSCHOUT/Apache-AuthCookie-3.23/lib/Apache2_4/AuthCookie.pm
>
> That - along with the module name - seems to show a way to obtain the
> "Require" that you need.  Why don't you give it a try ?
>
> Another way that I can think of, would be to use the Apache2::Directive
> module (http://perl.apache.org/docs/2.0/api/Apache2/Directive.html), to
> obtain the Require via the server's configuration tree.
> That should be independent of the specific Apache version being used.
>
>
> On 20.12.2015 03:35, Sergei Gerasenko wrote:
>
>> Hello,
>>
>> I’m using mod_perl-2.0.8-10 and I’ve been googling for days for this info
>> w/o any luck.
>>
>> I need to access the value for the Require directive in the apache
>> configs. I need to access that info in my authorization handler
>> (PerlAuthzHandler). It used to be that $r->requires provided that
>> information, but it’s gone now according to the changelog. It has been
>> replaced with register_auth_provider and according to this:
>>
>> perl -MModPerl::MethodLookup -e print_method register_auth_provider
>> To use method 'register_auth_provider' add:
>>          use Apache2::RequestUtil ();
>>
>> … it should be in Apache2::RequestUtil. But I can’t find anything about
>> that method in the description of Apache2::RequestUtil. Further, I get
>> “undefined method” when I try to even mention it in my handler.
>>
>> I must be missing something really simple? Can somebody point me to a
>> full example of using that method?
>>
>> Thanks!
>>
>> Sergei
>>
>>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.