def METHOD_NAME(self, responses, username, ip):
    for response, _ in responses:
        if self.checkUserPass(username, response, ip):
            return defer.succeed(username)
    return defer.fail(UnauthorizedLogin())