writing a module to check validity of user sessions

Mauro Stettler mauro.stettler at gmail.com
Wed Jan 27 13:20:15 MSK 2010


thanks for the tip, the combination with mod_eval works great.

i modified my module a little and use it in combination with mod_eval
to create a variable in the nginx config file that contains the
authentication status of a user.

my colleague alvaro videla wrote a little python server which can give
me the authentication status of a user based on the php session cookie
which i am passing to him using the check_session module:

http://obvioushints.blogspot.com/2010/01/inspecting-php-sessions-from-python.html

thats cool because we can now, using this variable in the nginx
config, cache pages in memcache which are specific to an
authentication level. thats going to save us a lot of cpu on our
really have php framework.

i attached my modified module and a test nginx config to the mail.

mauro




On Sun, Jan 24, 2010 at 23:59, Mauro Stettler <mauro.stettler at gmail.com> wrote:
> looks great, i will try that,
>
> thanks
>
>
>
> On Sun, Jan 24, 2010 at 23:49, Piotr Sikora <piotr.sikora at frickle.com> wrote:
>> Use eval module.
>>
>> Best regards,
>> Piotr Sikora < piotr.sikora at frickle.com >
>>
>>
>> _______________________________________________
>> nginx mailing list
>> nginx at nginx.org
>> http://nginx.org/mailman/listinfo/nginx
>>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ngx_http_check_session.c
Type: application/octet-stream
Size: 11075 bytes
Desc: not available
URL: <http://nginx.org/pipermail/nginx/attachments/20100127/7f567b67/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nginx.conf
Type: application/octet-stream
Size: 798 bytes
Desc: not available
URL: <http://nginx.org/pipermail/nginx/attachments/20100127/7f567b67/attachment-0003.obj>


More information about the nginx mailing list