'Generic credentials.'

def requestAvatarId(self, c):

    up = credentials.IUsernamePassword(c, None)
    username = up.username
    password = up.password
    player = PlayerDB.objects.get_player_from_name(username)
    res = (None, self.factory)
    if (player and player.check_password(password)):
        res = (player, self.factory)
    return defer.succeed(res)
