From: Michael Tremer Date: Wed, 22 Jan 2025 18:23:18 +0000 (+0000) Subject: web: Add handler that disables authentication X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=82b81a36e6e548e57bb7c7d8f54c150857b47bfa;p=pbs.git web: Add handler that disables authentication Signed-off-by: Michael Tremer --- diff --git a/src/web/base.py b/src/web/base.py index a2ba35f2..58715242 100644 --- a/src/web/base.py +++ b/src/web/base.py @@ -825,3 +825,13 @@ class AdminHandler(BaseHandler): # Fail if we don't have admin right if not self.current_user.is_admin(): raise tornado.web.HTTPError(403, "admin rights required") + + +class NoAuthMixin: + """ + Add this to skip the process of authentication. + + This is only useful to speed up a request when never authentication is required. + """ + async def get_session(self): + pass