def logout_endpoint(): root = app.config.get("BASE_URL", "") request_next = flask.request.args.get("next", root) if request_next.startswith("https") or request_next.startswith("http"): next_url = request_next else: next_url = build_redirect_url(app.config.get("ROOT_URL", ""), request_next) return logout(next_url=next_url)
def logout_endpoint(): root = config.get("BASE_URL", "") request_next = flask.request.args.get("next", root) if request_next.startswith("https") or request_next.startswith("http"): next_url = request_next else: next_url = build_redirect_url(config.get("ROOT_URL", ""), request_next) if domain(next_url) not in allowed_login_redirects(): raise UserError("invalid logout redirect URL: {}".format(next_url)) return logout(next_url=next_url)
def logout_endpoint(): root = app.config.get('APPLICATION_ROOT', '') next_url = build_redirect_url(app.config.get('ROOT_URL', ''), flask.request.args.get('next', root)) return flask.redirect(logout(next_url=next_url))