From 366679ff7c231957585c2f47051284dc766bb54f Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Sat, 24 Feb 2024 22:10:43 -0800 Subject: [PATCH] fix: 'dict' object issue --- backend/utils/utils.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/backend/utils/utils.py b/backend/utils/utils.py index 7ae7e6944..32724af39 100644 --- a/backend/utils/utils.py +++ b/backend/utils/utils.py @@ -61,10 +61,7 @@ def extract_token_from_auth_header(auth_header: str): def get_http_authorization_cred(auth_header: str): try: scheme, credentials = auth_header.split(" ") - return { - "scheme": scheme, - "credentials": credentials, - } + return HTTPAuthorizationCredentials(scheme=scheme, credentials=credentials) except: raise ValueError(ERROR_MESSAGES.INVALID_TOKEN)