[Zope3-Users] Programatically add plugins to PAU

Florian Lindner mailinglists at xgm.de
Wed Apr 12 10:40:05 EDT 2006


Am Mittwoch, 12. April 2006 08:39 schrieb Michael Howitz:
> Florian Lindner wrote:
> > Hello,
> > I've a PluggableAuthentication and want to add and register some plugins
> > to it.
> >
> > Adding works fine:
> >
> > principal_folder =
> > zope.app.authentication.principalfolder.PrincipalFolder(prefix = "cs")
> >
> > pau["PrincipalFolder"] = principal_folder
> >
> > and I think I can select it with:
> >
> > pau.credentialsPlugins = [principal_folder]
> >
> > but how to register it before?
> >
> > And how do I select credential plugins?
>
> This is how we did it in a project:
> createAuthenticationUtils is called on handling the ObjectAddedEvent for
> the folder (which is programmatically made a site) which should contain
> the PAU.

>      reg = site.UtilityRegistration(name, interface, utility)

Thanks for the code. One question: Of what type is site?

Thanks,

Florian


More information about the Zope3-users mailing list