views:

2382

answers:

5

I am trying to create a web application using Pylons and the resources on the web point to the PylonsBook page which isn't of much help. I want authentication and authorisation and is there anyway to setup Authkit to work easily with Pylons?

I tried downloading the SimpleSiteTemplate from the cheeseshop but wasn't able to run the setup-app command. It throws up an error:

  File "/home/cnu/env/lib/python2.5/site-packages/SQLAlchemy-0.4.7-py2.5.egg/sqlalchemy/schema.py", line 96, in __call__
    table = metadata.tables[key]
AttributeError: 'module' object has no attribute 'tables'

I use Pylons 0.9.7rc1, SQLAlchemy 0.4.7, Authkit 0.4.

+1  A: 

I don't think AuthKit is actively maintained anymore. It does use the Paste (http://pythonpaste.org) libs though for things like HTTP Basic/Digest authentication. I would probably go ahead and take a look at the source for some inspiration and then use the Paste tools if you want to use HTTP authentication.

There is also OpenID which is very easy to setup. The python-openid libs have an excellent example that is easy to translate to WSGI for wrapping a Pylons app. You can look at an example:

http://ionrock.org/hg/brightcontent-main/file/d87b7dcc606c/brightcontent/plugins/openidauth.py

elarson
Your URL gives me a 404 Not Found
Marius Gedminas
A: 

This actually got me interested:Check out this mailing on the pylons list. So AuthKit is being developed, and I will follow the book and get back on the results.

Bartosz Radaczyński
+1  A: 

Ok, another update on the subject. It seems that the cheeseshop template is broken. I've followed the chapter you linked in the post and it seems that authkit is working fine. There are some caveats:

  1. sqlalchemy has to be in 0.5 version
  2. authkit has to be the dev version from svn (easy_install authkit==dev)

I managed to get it working fine.

Bartosz Radaczyński
+3  A: 

I gave up on authkit and rolled my own: http://tonylandis.com/python/openid-db-authentication-in-pylons-is-easy-with-rpx/

Tony