def auth_init(self, request, request_class=AuthorizationRequest):
        """

        :param request: The AuthorizationRequest
        :return:
        """
        logger.debug("Request: '%s'" % request)
        # Same serialization used for GET and POST
        try:
            areq = self.server.parse_authorization_request(
                request=request_class, query=request)
        except (MissingRequiredValue, MissingRequiredAttribute) as err:
            logger.debug("%s" % err)
            areq = request_class().deserialize(request, "urlencoded")
            try:
                redirect_uri = self.get_redirect_uri(areq)
            except (RedirectURIError, ParameterError) as err:
                return self._error("invalid_request", "%s" % err)
            try:
                _rtype = areq["response_type"]
            except:
                _rtype = ["code"]
            return self._redirect_authz_error("invalid_request", redirect_uri,
                                              "%s" % err, areq["state"],
                                              _rtype)
        except KeyError:
            areq = request_class().deserialize(request, "urlencoded")
            # verify the redirect_uri
            try:
                self.get_redirect_uri(areq)
            except (RedirectURIError, ParameterError) as err:
                return self._error("invalid_request", "%s" % err)
        except Exception as err:
            message = traceback.format_exception(*sys.exc_info())
            logger.error(message)
            logger.debug("Bad request: %s (%s)" % (err, err.__class__.__name__))
            return BadRequest("%s" % err)

        if not areq:
            logger.debug("No AuthzRequest")
            return self._error("invalid_request", "Can not parse AuthzRequest")

        areq = self.filter_request(areq)

        if self.events:
            self.events.store('protocol request', areq)

        if self.trace:
            self.trace.info('{}'.format(areq.to_dict()))
            if 'request' in areq:
                if areq['request'].jwe_header:
                    self.trace.info('request.jwe_header: {}'.format(
                        areq['request'].jwe_header))
                if areq['request'].jws_header:
                    self.trace.info('request.jws_header: {}'.format(
                        areq['request'].jws_header))

        try:
            _cinfo = self.cdb[areq['client_id']]
        except KeyError:
            return self._error('unauthorized_client', 'unknown client')
        else:
            try:
                rtypes = _cinfo['response_types']
            except KeyError:
                rtypes = ['code']  # default according to OIDC registration

            if ' '.join(areq["response_type"]) not in rtypes:
                return self._error("invalid_request",
                                   "Trying to use unregistered response_typ")

        logger.debug("AuthzRequest: %s" % (areq.to_dict(),))
        try:
            redirect_uri = self.get_redirect_uri(areq)
        except (RedirectURIError, ParameterError, UnknownClient) as err:
            return self._error("invalid_request", "%s" % err)

        try:
            keyjar = self.keyjar
        except AttributeError:
            keyjar = ""

        try:
            # verify that the request message is correct
            areq.verify(keyjar=keyjar, opponent_id=areq["client_id"])
        except (MissingRequiredAttribute, ValueError) as err:
            return self._redirect_authz_error("invalid_request", redirect_uri,
                                              "%s" % err)

        return {"areq": areq, "redirect_uri": redirect_uri}
dataset/ETHPy150Open rohe/pyoidc/src/oic/oauth2/provider.py/Provider.auth_init/original