[Catalyst] Catalyst with HTTP authentication

Robert Rothenberg robrwo at gmail.com
Fri Mar 22 11:46:00 GMT 2013

On 14/03/13 08:51 Tomas Doran wrote:
> On 12 Mar 2013, at 17:10, Robert Rothenberg <robrwo at gmail.com> wrote:
>>> (Unless you mean you want to do the authentication on the proxy,
>>> rather than the app servers).
>> I want to do the latter.
> You should still be able to use Authentication::Credential::Remote,
> you'll just need to re-configure your web server and proxy to do the
> right thing with headers (i.e. the proxy needs to send the username along
> in a header, and then the web server needs to pass that down into the
> environment.
> Have a go and post some configs for your proxy / web server if it isn't
> working for you.

I understand how to have an Apache reverse proxy send the REMOTE_USER as a
header, with something like

  RequestHeader set X-Proxy-REMOTE-USER %{REMOTE_USER}

but how to I get Authentication::Credential::Remote to use the header
instead of the environment variable?  Do I need an auto method in Root.pm
that checks for the header and sets $c->req->remote_user()?

More information about the Catalyst mailing list