fix: 'dict' object issue

This commit is contained in:
Timothy J. Baek 2024-02-24 22:10:43 -08:00
parent 1d3fadb221
commit 366679ff7c

View file

@ -61,10 +61,7 @@ def extract_token_from_auth_header(auth_header: str):
def get_http_authorization_cred(auth_header: str): def get_http_authorization_cred(auth_header: str):
try: try:
scheme, credentials = auth_header.split(" ") scheme, credentials = auth_header.split(" ")
return { return HTTPAuthorizationCredentials(scheme=scheme, credentials=credentials)
"scheme": scheme,
"credentials": credentials,
}
except: except:
raise ValueError(ERROR_MESSAGES.INVALID_TOKEN) raise ValueError(ERROR_MESSAGES.INVALID_TOKEN)