def METHOD_NAME(environ, start_response):
    session = environ["beaker.session"]
    path = environ.get("PATH_INFO", "").lstrip("/")
    if path == "robots.txt":
        return static(environ, start_response, "static/robots.txt")
    if path.startswith("static/"):
        return static(environ, start_response, path)
    if path == "logout":
        session.invalidate()
        resp = SeeOther("static/log_out_message.html")
        return resp(environ, start_response)
    if path == "as":
        session["callback"] = True
        request = parse_qs(get_or_post(environ))
        _cli = CONSUMER[unquote(request["authzsrv"][0])]
        session["client"] = store_client(_cli)
        sid, redirect_uri = _cli.begin(RP_CONF.BASE, path)
        resp = SeeOther(redirect_uri)
        return resp(environ, start_response)
    if path == "rp":
        session["callback"] = True
        request = parse_qs(get_or_post(environ))
        _cli = CONSUMER[unquote(request["iss"][0])]
        session["client"] = store_client(_cli)
        sid, redirect_uri = _cli.begin(RP_CONF.BASE, path)
        resp = SeeOther(redirect_uri)
        return resp(environ, start_response)
    if path == "authz_cb":
        _cli = get_client(session["client"])
        request = get_or_post(environ)
        aresp = _cli.handle_authorization_response(request)
        rargs = {"code": aresp["code"]}
        atresp = _cli.do_access_token_request(request_args=rargs)
        # Access token should be stored somewhere for later usage
        Token[atresp["state"]] = atresp
        resp = Response("Got access token: %s" % atresp["access_token"])
        return resp(environ, start_response)
    return as_choice(environ, start_response)