Changeset 5900 for main/waeup.sirp/trunk/src/waeup
- Timestamp:
- 30 Mar 2011, 16:24:24 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/authentication.py
r5055 r5900 3 3 import grok 4 4 import waeup.sirp.permissions 5 from zope.component import getUtility 5 from zope.component import getUtility, getUtilitiesFor 6 6 try: 7 7 from zope.pluggableauth.plugins.session import SessionCredentialsPlugin … … 20 20 from zope.securitypolicy.interfaces import IPrincipalRoleManager 21 21 from zope.securitypolicy.principalrole import principalRoleManager 22 from waeup.sirp.interfaces import IUserAccount 22 from waeup.sirp.interfaces import IUserAccount, IAuthPluginUtility 23 23 24 24 def setup_authentication(pau): … … 27 27 Sets up an IAuthenticatorPlugin and 28 28 ICredentialsPlugin (for the authentication mechanism) 29 30 Then looks for any external utilities that want to modify the PAU. 29 31 """ 30 32 pau.credentialsPlugins = ['No Challenge if Authenticated', 'credentials'] 31 33 pau.authenticatorPlugins = ['users'] 34 35 # Give any third-party code and subpackages a chance to modify the PAU 36 auth_plugin_utilities = getUtilitiesFor(IAuthPluginUtility) 37 for util in auth_plugin_utilities: 38 util.register(pau) 32 39 33 40 class WAeUPSessionCredentialsPlugin(grok.GlobalUtility,
Note: See TracChangeset for help on using the changeset viewer.