def phaseN(self, environ, query, server_env, session):
        """Step 2: Once the consumer has redirected the user back to the
        callback URL you can request the access token the user has
        approved."""

        client = session['client']
        logger.debug("info: %s", query)
        logger.debug("keyjar: %s", client.keyjar)

        authresp = client.parse_response(AuthorizationResponse, query,
                                         sformat="dict", keyjar=client.keyjar)

        if isinstance(authresp, ErrorResponse):
            return False, "Access denied"
        try:
            client.id_token = authresp["id_token"]
        except:
            pass
        # session.session_id = msg["state"]

        logger.debug("callback environ: %s", environ)

        if self.flow_type == "code":
            # get the access token
            try:
                tokenresp = self.get_accesstoken(client, authresp)
            except Exception as err:
                logger.error("%s", err)
                raise

            if isinstance(tokenresp, ErrorResponse):
                return (False, "Invalid response %s." % tokenresp["error"])

            access_token = tokenresp["access_token"]
        else:
            access_token = authresp["access_token"]

        userinfo = self.verify_token(client, access_token)

        inforesp = self.get_userinfo(client, authresp, access_token)

        if isinstance(inforesp, ErrorResponse):
            return False, "Invalid response %s." % inforesp["error"], session

        tot_info = userinfo.update(inforesp.to_dict())

        logger.debug("UserInfo: %s", inforesp)

        return True, userinfo, access_token, client

    # noinspection PyUnusedLocal
dataset/ETHPy150Open rohe/pyoidc/oidc_example/rp2/oidc.py/OpenIDConnect.phaseN/original