You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Karl Pflästerer <k...@rl.pflaesterer.de> on 2012/10/08 23:47:37 UTC

mod_lua authen/authz

Hi,
I'm not sure if this is the right list; if not just tell me where to ask
my question.

I wanted to use mod_lua to replace a custom authen/authz handler (at the
moment written with mod_perl) with a lua handler (since mod_perl and
httpd2.4 do not work at the moment).

I used the examples here
http://httpd.apache.org/docs/trunk/developer/lua.html and
here http://httpd.apache.org/docs/trunk/mod/mod_lua.html but had no luck
with the authen part.

The authz part works
  LuaAuthzProvider foo authz.lua authz_check_foo
The function authz_check_foo gets called.

But how do I write the config so that for the authentication also a lua
function gets called?
  LuaHookAuthChecker foo.lua  check_auth early
does nothing.

Basically I want the same as with this configuration (for mod_perl):

<LocationMatch "/admin/">
  AuthName Admin-XXX
  AuthType Basic
  Require Group1 Group2
  PerlAuthenHandler DFV::Authen
  PerlAuthzHandler  DFV::Authen
</LocationMatch>

That handler checks if the user has the right password and is in at
least one of the required groups.

TIA
  KP