[Twisted-Python] Authentication with Perspective Broker and hashed password file
Dave Cook
daverz at gmail.com
Fri Feb 11 19:57:34 MST 2005
I'd like to authenticate my PB client against a hashed password file,
but I'm getting an error when I use a hash:
Failure: twisted.cred.error.UnhandledCredentials: No checker for
twisted.spread.interfaces.IJellyable,
twisted.cred.credentials.IUsernameHashedPassword,
twisted.cred.credentials.ICredentials,
twisted.spread.pb.IUsernameMD5Password
However, if I use plaintext passwords, it works fine.
I'm working with the example in the book:
http://twistedmatrix.com/documents/current/howto/pb-cred#auto7
with the credential checker set to
import sha
myChecker = checkers.FilePasswordDB("my_hashed_passwd_file",
hash =
lambda u, p, h: sha.new(p).hexdigest())
I've tested this checker and hash, and they work fine for logging in
to my nevow site.
The example works, though if I use plaintext passwords and don't pass in a hash:
myPlaintextChecker = checkers.FilePasswordDB("my_plaintext_passwd_file")
Thanks for any hints,
Dave Cook
More information about the Twisted-Python
mailing list