Hello, José. This is awesome. Thank you *very* much!
I'm currently working on a project where I wanted authentication and authorization to be configured from simple files (not from scripts), so it's great news I'll be able to take advantage of this feature :) However, I'm going to include it in the next release because v1.0 already has a release candidate, and I'd prefer to fix its bugs only (instead of adding features). Cheers! On Friday December 12, 2008 15:05:58 jdinu...@uc.edu.ve wrote: > Hello > > I'm interested in using repoze.what with paster, so I made this patch that > allows pasteDeploy to initializate repoze.what and its plugins via > repoze.who. > > > Example of Use: > > Suppose you have a repoze.bfg instance of name zbfg. You activate > repoze.who as usual in zbfg.ini: > > > [DEFAULT] > debug = true > > [server:main] > use = egg:Paste#http > host = 0.0.0.0 > port = 6543 > > [app:main] > use = egg:zbfg#app > reload_templates = true > filter-with = who > > [filter:who] > use = egg:repoze.who#config > config_file = %(here)s/who.ini > log_file = stdout > log_level = debug > > > Now, you can configure repoze.who and repoze.what in who.ini > > # the habitual repoze.who plugins > [plugin:basicauth] > use = repoze.who.plugins.basicauth:make_plugin > realm = 'zbfg app' > [plugin:htpasswd] > use = repoze.who.plugins.htpasswd:make_plugin > filename = %(here)s/passwd > check_fn = repoze.who.plugins.htpasswd:crypt_check > > # Now, repoze.what > [plugin:what] > use = repoze.what.config:make_plugin > config_file = what.ini > curdir = %(here)s/ > > # the usual repoze.who config > [general] > request_classifier = repoze.who.classifiers:default_request_classifier > challenge_decider = repoze.who.classifiers:default_challenge_decider > remote_user_key = REMOTE_USER > [identifiers] > plugins = basicauth > [authenticators] > plugins = htpasswd > [challengers] > plugins = basicauth > > # and repoze.what > [mdproviders] > plugins = what > > > repoze.what plugins can be configured in what.ini. One section per plugin, > one entry per parameter, plus "use=package.module:class" to instantiate the > plugin: > > [group:ini] > use = repoze.what.plugins.ini:INIGroupAdapter > filename = group.ini > > [permissions:ini] > use = repoze.what.plugins.ini:INIPermissionsAdapter > filename = permissions.ini > > > Best regards -- Gustavo Narea <http://gustavonarea.net/>. Get rid of unethical constraints! Get freedomware: http://www.getgnulinux.org/ _______________________________________________ Repoze-dev mailing list Repoze-dev@lists.repoze.org http://lists.repoze.org/listinfo/repoze-dev