From e9c3117ae101aaaf8697a3a5a5bb0fb8edeb7249 Mon Sep 17 00:00:00 2001 From: Jimisola Laursen Date: Thu, 29 Jun 2023 10:47:39 +0200 Subject: [PATCH] fix: Remove base64 encoding of OAuth Bearer token --- src/maven_artifact/requestor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/maven_artifact/requestor.py b/src/maven_artifact/requestor.py index 22c559c..311ec9f 100644 --- a/src/maven_artifact/requestor.py +++ b/src/maven_artifact/requestor.py @@ -25,7 +25,7 @@ def request(self, url, onFail, onSuccess=None, method: str = "get", **kwargs): elif Utils.is_base64(self.password): headers["Authorization"] = f"Basic {self.password}" elif self.token: - headers["Authorization"] = f"Bearer {base64.b64encode(self.token.encode()).decode()}" + headers["Authorization"] = f"Bearer {self.token}" try: response = getattr(requests, method)(url, headers=headers, **kwargs)