I imported the first version of a tg2 plugin to use repoze.who
authentication in the turbogears SVN:
http://svn.turbogears.org/projects/tgrepozewho/trunk/
this plugin permits to use the tg1 identity database model against a
TG2 application with a nearly compatible API. The identity predicates
have been re-used (not the host checks, but all the in_group,
in_all_groups, has_permission ...
a demo app is also available here:
http://svn.turbogears.org/projects/tgrepozewho/examples/whotg/
don't forget to setup.py develop before running paster serve on the
development.ini file...
as you can see, I just defined the tables/mappers in the model of our
app and then pass the desired class and criterion to the plugin so it
can do its job.
There are some things that are still-to-be-done:
- For the moment you will need to manually create the users, groups
and permissions in the database, or use dbsprocket :-)
- the readme is partly miss-leading because it gives you info about
a login/password that does not exist
- the password is not encrypted in the database and I still need to
think where I'll re-add this well know functionality we had in tg1
- this is only an SQL provider...
- I left out the unit tests for the moment :-(
Best regards,
Florent.
PS: don't hesitate to send comments, patches, praises, flames :)