소스 검색

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)