From 5a1e6cbcb8e0a5fb78b75e68c13072e738cb88a3 Mon Sep 17 00:00:00 2001 From: matialm Date: Wed, 31 Jan 2024 11:07:01 -0300 Subject: [PATCH] Update auth.py Remove the Bearer from x_redirect_server, with the count remove only the first coincidence and it make fails the redirect auth url callback. --- trino/auth.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trino/auth.py b/trino/auth.py index dc7b577a..fc078651 100644 --- a/trino/auth.py +++ b/trino/auth.py @@ -320,7 +320,7 @@ def _attempt_oauth(self, response: Response, **kwargs: Any) -> None: raise exceptions.TrinoAuthError(f"Error: header info didn't match {auth_info}") auth_info_headers = parse_dict_header( - _OAuth2TokenBearer._BEARER_PREFIX.sub("", auth_info, count=1)) # type: ignore + _OAuth2TokenBearer._BEARER_PREFIX.sub("", auth_info)) # type: ignore auth_server = auth_info_headers.get('x_redirect_server') token_server = auth_info_headers.get('x_token_server')