def getUser(self, user, creds): print 'getuser', user avatarId, hashedpass = str(user.id), str(user.password) if hashpass.check_password_against_hash(creds.password, hashedpass): self.cache[(creds.username, creds.password)] = avatarId return defer.succeed(avatarId) else: return defer.fail(error.UnauthorizedLogin())
def getUser(self, user, creds): print 'getuser', user avatarId, hashedpass = str(user.id), str(user.password) if hashpass.check_password_against_hash(creds.password, hashedpass): self.cache[(creds.username, creds.password)] = avatarId return defer.succeed(avatarId) else: return defer.fail(error.UnauthorizedLogin())
def getUser(self, user, creds): avatarId, hashedpass = str(user.id), str(user.password) if hashpass.check_password_against_hash(creds.password, hashedpass): return defer.succeed(avatarId) else: return defer.fail(error.UnauthorizedLogin())
def getUser(self, user, creds): avatarId, hashedpass = str(user.id), str(user.password) if hashpass.check_password_against_hash(creds.password, hashedpass): return defer.succeed(avatarId) else: return defer.fail(error.UnauthorizedLogin())