From 092de8827d075525c094a8e422fb65fc2b9376d8 Mon Sep 17 00:00:00 2001 From: retoor Date: Thu, 5 Dec 2024 19:05:43 +0100 Subject: [PATCH] Update middlewares. --- src/app/app.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/app.py b/src/app/app.py index f114c4d..b3acbd4 100644 --- a/src/app/app.py +++ b/src/app/app.py @@ -41,12 +41,12 @@ class BaseApplication(web.Application): web.run_app(self, *args, **kwargs) async def authenticate(self, username, password): - return self.username == username and self.password == password + return self.basic_username == username and self.basic_password == password @web.middleware async def base64_auth_middleware(self, request, handler): auth_header = request.headers.get("Authorization") - if not self.username: + if not self.basic_username: return await handler(request) if not auth_header or not auth_header.startswith("Basic "): return web.Response(