[Twisted-web] Problem using nevow.guard
jjconti at gmail.com
Sun Feb 28 14:23:00 EST 2010
Hi! based on the example given at
I'm trying to add user authentication to a part of a Nevow site I'm
running. This is my slightly modified version of guard2.py
I've notice that this works if I create a appserver.NevowSite using
this "authenticated resource" instead of my IndexPage():
#site = appserver.NevowSite(IndexPage())
site = appserver.NevowSite(authenticatedResource(IndexPage()))
but I don't want the hole site to be authenticated. I'd like to add
the authentication only to a particular section. So, what I'm doing is
returning a authenticatedResource(SectionIWantToProtectPage()) where I
was returning SectionIWantToProtectPage(). i.e. in the child_auth
method of IndexPage().
site = appserver.NevowSite(IndexPage())
When I do that, firefox complains that the server is redirecting the
request to http://localhost:8009/auth/?__start_session__=1 in a way
that will never be complete. It ask if I have cookies disabled and
says that If enabling cookies for this site solves the problem, the
real problem is in the server configuration.
So... could you help me? I don't know what I'm doing wrong.
More information about the Twisted-web