>    security.declarePrivate('authenticateCredentials')
>    def authenticateCredentials(self, credentials):
>        """ Authentication Part """
>        login = credentials.get('login', '')
>        password = credentials.get('password', '')
>        return login, login
>
> it work bad, it start with everything i put on username and password,
> it donĀ“t validate if user exist. How can i do it???
I don't understand what you're doing.
Can describe your use case, please?

So far I know that you want to 'validate if user exists',
but where are your users defined? RDBMS? ZODB?
You should have plugin that implements:
IUserAdderPlugin interface. What plugin is this
in your environment?

Take a look at plugins/ZODBUserManager.

This plugin has three attributes:
        self._user_passwords = OOBTree()
        self._login_to_userid = OOBTree()
        self._userid_to_login = OOBTree()

and it stores user data there.

Then it's authenticateCredentials is able to
check if user with specific login and password
exists there.

-- 
Maciej Wisniowski
_______________________________________________
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to