浏览代码

fix: 'dict' object issue

Timothy J. Baek 1 年之前
父节点
当前提交
366679ff7c
共有 1 个文件被更改,包括 1 次插入4 次删除
  1. 1 4
      backend/utils/utils.py

+ 1 - 4
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)