perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jie Gao <>
Subject Re: Perl Authorization handler called before authentication handler
Date Fri, 26 Jun 2015 07:01:35 GMT
* Lathan Bidwell <> wrote:

> Date: Fri, 12 Sep 2014 12:14:35 -0400
> From: Lathan Bidwell <>
> To:
> Subject: Perl Authorization handler called before authentication handler
Not sure if you still need this, but my findings are it is the
correct behaviour under Apache24 for the authz to run first; if anything
in authz requires any info from the authn phase, authn will be
run and authz will be re-run after that.

As authz behaves "drastically" different under ap24 (for the better),
any existing ap2.* modperl authn/authz modules will need to be overhauled.

You can play with the RequireAll/RequireAny containers to get a hang of it.
I am certainly exploring it now myself.



> I have looked all around apache's documentation on how to upgrade from 2.2
> to 2.4, but they don't include much about using PerlAddAuthzProvider or
> PerlAuthenHandler.
> I have this config section:
> PerlAddAuthzProvider membersuser Application::User::Members->authorize24
> <DirectoryMatch ^.*/members/>
>         DirectoryIndex disabled
>         PerlAuthenHandler       Application::User::Members->authenticate24
>         #PerlAuthenHandler      Application::User::Members::authenticate24
>         AuthType        Application::User::Members
>         AuthName        "Members"
>         Require membersuser testing123
> </DirectoryMatch>
> But for some reason, my authorize24 subroutine is being called before my
> authenticate24 subroutine.
> I have simplified those 2 subroutines down to printing debugging info to
> the error log, (the authen sub sets $r->user('testing')), but I cannot
> figure out why the handlers are called in the wrong order.
> Lathan

View raw message