I've finally had the time to implement a long awaited feature of configuring authentication and authorization via configuration files.
It's now available in repoze.what-quickstart 1.0.1 and although it's not (yet) integrated into TG2, you still can use it: All you have to do is port your
auth settings in app_cfg.py to an .ini file.
Specifically, you have to prevent TG2 from configuring authn&authz for you [1], so you can add the middleware by hand [2] and finally create your
configuration file. For most people, this file will contain the following:
======
[general]
dbsession = your_project.model:DBSession
[authentication]
user_class = your_project.model:User
[authorization]
group_class = your_project.model:Group
permission_class = your_project.model:Permission
=====
Happy hacking!
[1] http://turbogears.org/2.0/docs/main/Auth/Customization.html#disabling-authentication-and-authorization
[2] http://code.gustavonarea.net/repoze.what-quickstart/Config.html
--
Gustavo Narea <xri://=Gustavo>.
| Tech blog: =Gustavo/(+blog)/tech ~ About me: =Gustavo/about |