def METHOD_NAME(self, request, cookie, **kwargs):
    """
    Verify if the authentication was successful.
    :rtype : Response
    :param request: Contains the request parameters.
    :param cookie: Cookies sent with the request.
    :param kwargs: Any other parameters.
    :return: If the authentication was successful: a redirect to the
    return_to url. Otherwise a unauthorized response.
    :raise: ValueError
    """
    logger.debug("verify(%s)" % request)
    if isinstance(request, str):
        _dict = parse_qs(request)
    elif isinstance(request, dict):
        _dict = request
    else:
        raise ValueError("Wrong type of input")
    try:
        cas_cookie, _ts, _typ = self.getCookieValue(cookie, self.CONST_CAS_COOKIE)
        data = json.loads(cas_cookie)
        nonce = base64.b64decode(data[self.CONST_NONCE])
        if nonce != _dict[self.CONST_NONCE][0]:
            logger.warning("Someone tried to login without a correct nonce!")
            return Unauthorized("You are not authorized!")
        acr = None
        try:
            acr = _dict["acr_values"][0]
        except KeyError:
            pass
        uid = self.handle_callback(
            _dict[self.CONST_TICKET], self.get_service_url(nonce, acr)
        )
        if uid is None or uid == "":
            logger.info("Someone tried to login, but was denied by CAS!")
            return Unauthorized("You are not authorized!")
        cookie = self.create_cookie(uid, "casm")
        return_to = self.generate_return_url(self.return_to, uid)
        if "?" in return_to:
            return_to += "&"
        else:
            return_to += "?"
        return_to += base64.b64decode(data[self.CONST_QUERY])
        return SeeOther(return_to, headers=[cookie])
    except Exception:
        # FIXME: This should catch specific exception thrown from methods in the block
        logger.critical(
            "Metod verify in user_cas.py had a fatal exception.", exc_info=True
        )
        return Unauthorized("You are not authorized!")