Hello,

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=PluggableAuthentication('my_')
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?

--
Thanks,
Alexei

_______________________________________________
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users

Reply via email to