AW: [Zope3-Users] PAU / credentials / authentication

Rupert Redington rupert at neontribe.co.uk
Thu Sep 6 07:54:45 EDT 2007


Roger Ineichen wrote:
> Hi
> 
>> An: Hermann Himmelbauer
>> Cc: zope3-users at zope.org
>> Betreff: Re: [Zope3-Users] PAU / credentials / authentication
> 
> [...]
> 
>> # My event subscriber will be passed a reference to the site 
>> object # from which we can get the sitemanager sitemanager = 
>> event.object.getSiteManager() pau = PluggableAuthentication() 
>> sitemanager['PAU'] = pau sitemanager.registerUtility(pau, 
>> IAuthentication) # Tell the PAU which sort of credentials we 
>> want to use pau.credentialsPlugins = (u'Session Credentials') 
> 
> make sure this is a tuple:
> pau.credentialsPlugins = (u'Session Credentials',)
> 
> or even better, never override it:
> pau.credentialsPlugins += (u'Session Credentials',)
> 
> 
> Regards
> Roger Ineichen
> _____________________________
> END OF MESSAGE
> 

Thanks Roger,

The non-tuple was an editing mistake, mine normally reads:

pau.credentialsPlugins = (u'Session Credentials', u'Zope Realm Basic-Auth')

but your other suggestion is much cleaner anyway.

Rupert


More information about the Zope3-users mailing list