Help needed: Authkit with Repoze

0 views
Skip to first unread message

pythonic

unread,
Mar 7, 2008, 5:40:49 AM3/7/08
to AuthKit
I am trying yo use Authkit for Repoze.zope2.
I can see login page whenever any page raises 401, however I don't see
http var REMOTE_USER set. My configuration is simple.

[filter:authkit]
paste.filter_app_factory = authkit.authenticate:middleware
setup.method = form, cookie
form.authenticate.user.data = admin:admin
cookie.secret = secret string
[pipeline:main]
pipeline = egg:Paste#cgitb
authkit

Not sure what is wrong. Any pointers?

TIA.

James Gardner

unread,
Mar 7, 2008, 5:53:04 AM3/7/08
to aut...@googlegroups.com
Hi,

If the login form is displaying the middleware is probably set up
correctly. Which version of AuthKit are you using? Also, what happens if
you type in the wrong login details? Do you get the form again? The only
other thing I can think of is that you might be checking REMOTE_USER in
a component that is used *before* the request is passed to AuthKit and
before AuthKit has a chance to set REMOTE_USER? Also have you checked
the cookie is actually set?

Cheers,

James

Message has been deleted

pythonic

unread,
Mar 7, 2008, 6:14:18 AM3/7/08
to AuthKit
AuthKit version is 0.4 (shoud have mentioned it before).
There is no cookie set and hwen I type wrong (or correct) login
details, I come back to the same form.

James Gardner

unread,
Mar 7, 2008, 6:26:40 AM3/7/08
to aut...@googlegroups.com
OK, well the problem is that the cookie isn't being set so AuthKit
assumes there is no user and so doesn't set REMOTE_USER. Double check
the form action from the login page to ensure it is posting to the same
URL it is currently at. I think there is a bug in the latest SVN which
sometimes auto-generates the wrong URL.

Cheers,

James


pythonic wrote:
> AuthKit version is 0.4 (sorry didnt mention that earlier).
> On entering wrong login details, it comes back to the same page.
> There is no cookie set.


>
> On Mar 7, 3:53 pm, James Gardner <ja...@pythonweb.org> wrote:

pythonic

unread,
Mar 7, 2008, 6:40:14 AM3/7/08
to AuthKit
Form action is same as the URL it is currently at.

Thanks.
Reply all
Reply to author
Forward
0 new messages