On Mon, 2002-08-26 at 13:57, Alec Munro wrote:
Hi all, I'm storing users in Mysql, and doing custom authentication on them. I want to know if Zope has access to the crypt function, or if there is something equivalent that is preferred. Thanks.
I did some digging into this last night and discovered that Zope's password authentication function recognizes LDAP-style password encoding prefixes. For UNIX crypt password, use this in your SELECT: SELECT ..., CONCAT('{CRYPT}', passwd) AS password ... This is real easy to do with SimpleUserFolder (on zope.org). A couple Z SQL Methods and you are done. A couple other encodings are recognized (SHA, SHAA); see AccessControl/AuthEncoding.py for more details. I believe it is possible to add other encodings with your own products. n.b. I thought that LDAP's password encoding names were either lower-case or case-insensitive, but all the Zope encoding names are upper-case. -- Andy Dustman PGP: 0x930B8AB6 @ .net http://dustman.net/andy "Cogito, ergo sum." -- Rene Descartes "I yam what I yam and that's all what I yam." -- Popeye