[Catalyst] Plugin::Authentication overrides $c->req->user
Peter Karman
peter at peknet.com
Wed Feb 11 21:37:30 GMT 2009
Daniel Westermann-Clark wrote on 02/11/2009 02:53 PM:
> On 2009-02-11 10:06:42 +0100, Rodrigo wrote:
>> I'm not familiar with $c->req->user, but isn't REMOTE_USER a header
>> you can read with $c->req->header('remote_user'), or whatever header
>> name is being passed around?
>
> Some authentication schemes might provide headers containing the
> username, but REMOTE_USER is different. It's not available as a
> header.
>
> Regardless, is there a reason it should be a string at first and then
> an object? It's inconsistent and causes a loss of information about
> the request.
>
> If no one is using this behavior, I'd be happy to provide patches to
> deprecate or remove it.
>
Why not just add a remote_user() method on $c->req instead? It's a
little more typing, but is more explicit about where the value comes
from and doesn't potentially break any existing apps.
--
Peter Karman . peter at peknet.com . http://peknet.com/
More information about the Catalyst
mailing list