def validate_short_term_login_token_and_get_user_id(self, login_token):
        try:
            macaroon = pymacaroons.Macaroon.deserialize(login_token)
            auth_api = self.hs.get_auth()
            auth_api.validate_macaroon(macaroon, "login", True)
            return self.get_user_from_macaroon(macaroon)
        except (pymacaroons.exceptions.MacaroonException, __HOLE__, ValueError):
            raise AuthError(401, "Invalid token", errcode=Codes.UNKNOWN_TOKEN)
dataset/ETHPy150Open matrix-org/synapse/synapse/handlers/auth.py/AuthHandler.validate_short_term_login_token_and_get_user_id