From 82238a3c2db2508d8f67d667f6b024a1b66ad21c Mon Sep 17 00:00:00 2001 From: Joseph Long Date: Thu, 23 May 2024 08:37:21 -0300 Subject: [PATCH 1/3] allow for space delimited scope string --- xero_python/api_client/oauth2.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xero_python/api_client/oauth2.py b/xero_python/api_client/oauth2.py index ca7aab20..f2277425 100644 --- a/xero_python/api_client/oauth2.py +++ b/xero_python/api_client/oauth2.py @@ -213,7 +213,7 @@ def can_refresh_access_token(self): """ return ( self.refresh_token - and isinstance(self.scope, (list, tuple)) + and isinstance(self.scope, (list, tuple, str)) and self.client_id and self.client_secret ) From d056f4224706836b9ebea75b31401c81c7597a1d Mon Sep 17 00:00:00 2001 From: Joseph Long Date: Thu, 23 May 2024 08:45:35 -0300 Subject: [PATCH 2/3] throw away extra keyword args in update_token rather than throw an "unexpected keyword argument" TypeError --- xero_python/api_client/oauth2.py | 1 + 1 file changed, 1 insertion(+) diff --git a/xero_python/api_client/oauth2.py b/xero_python/api_client/oauth2.py index f2277425..34b83eca 100644 --- a/xero_python/api_client/oauth2.py +++ b/xero_python/api_client/oauth2.py @@ -278,6 +278,7 @@ def update_token( expires_at=None, refresh_token=None, id_token=None, + **kwargs ): """ Set new auth2 token details From 593d37297b124c1ea8810ec5cf6e4d1efddbe602 Mon Sep 17 00:00:00 2001 From: Joseph Long Date: Mon, 2 Dec 2024 15:21:25 -0400 Subject: [PATCH 3/3] Removed unused param as per requested by @manishT72 --- xero_python/api_client/oauth2.py | 1 - 1 file changed, 1 deletion(-) diff --git a/xero_python/api_client/oauth2.py b/xero_python/api_client/oauth2.py index 34b83eca..f2277425 100644 --- a/xero_python/api_client/oauth2.py +++ b/xero_python/api_client/oauth2.py @@ -278,7 +278,6 @@ def update_token( expires_at=None, refresh_token=None, id_token=None, - **kwargs ): """ Set new auth2 token details