I'll try. Your authenticator is registered as a Plugin in a PAU in your current site? I'm not sure the cause without more details, but when I see this happen I've usually neglected one of the following:

1. The credentials plugin is not selected and added.
2. The authenticator plugin is not selected and added.
3. No permissions have been granted to the user, so even though the user is valid, they don't have permissions to do anything and so another authentication is being called as a backup. This is easy enough to debug by putting print statements at strategic points in your plugin and see if and when they show up in the Zope log.

The PAU stuff has changed a lot over the history of Zope 3, so I've also found it to happen when using outdated methods such as the ones in Phillips first edition (which have since been updated to reflect the latest methods - thanks Phillip).


On Jan 28, 2007, at 5:44 PM, Alexei Ustyuzhaninov wrote:


I try to create a plugin, which could authenticate users against an
external database. Here is the code:

from zope.component import provideUtility
from zope.app.authentication import PluggableAuthentication
from zope.app.authentication.interfaces import\
   ICredentialsPlugin, IAuthenticatorPlugin
from zope.app.authentication.session import SessionCredentialsPlugin
from zope.app.security.interfaces import IAuthentication
from mypackage.Authentication import MyAuthenticatorPlugin

provideUtility(SessionCredentialsPlugin(), ICredentialsPlugin,\
   'My Credentials Plugin')
provideUtility(MyAuthenticatorPlugin(), IAuthenticatorPlugin,
   'My Authenticator Plugin')
pau.credentialsPlugins=('Cascade Credentials Plugin', )
pau.authenticatorPlugins=('Cascade Authenticator Plugin', )
provideUtility(pau, IAuthentication, 'My Pluggable-Authentication Utility'

This code is contained in the file mypackage/__init__.py, mypackage in
turn is loaded via ZCML. Both plugins and PAU are registered
successfully and I can access them with queryUtility. But the
authentication is carried through the standard mechanism and
MyAuthenticatorPlugin isn't even called.

Could any good soul help me with this case?


Zope3-users mailing list

Zope3-users mailing list

Reply via email to