sumo-wrapper-python 1.10.0__py3-none-any.whl → 1.11.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- sumo/wrapper/_auth_provider.py +16 -1
- sumo/wrapper/_version.py +2 -2
- sumo/wrapper/sumo_client.py +5 -0
- {sumo_wrapper_python-1.10.0.dist-info → sumo_wrapper_python-1.11.0.dist-info}/METADATA +1 -1
- {sumo_wrapper_python-1.10.0.dist-info → sumo_wrapper_python-1.11.0.dist-info}/RECORD +9 -9
- {sumo_wrapper_python-1.10.0.dist-info → sumo_wrapper_python-1.11.0.dist-info}/WHEEL +1 -1
- {sumo_wrapper_python-1.10.0.dist-info → sumo_wrapper_python-1.11.0.dist-info}/entry_points.txt +0 -0
- {sumo_wrapper_python-1.10.0.dist-info → sumo_wrapper_python-1.11.0.dist-info}/licenses/LICENSE +0 -0
- {sumo_wrapper_python-1.10.0.dist-info → sumo_wrapper_python-1.11.0.dist-info}/top_level.txt +0 -0
sumo/wrapper/_auth_provider.py
CHANGED
|
@@ -65,7 +65,10 @@ class AuthProvider:
|
|
|
65
65
|
retry_error_callback=_return_last_value,
|
|
66
66
|
before_sleep=_log_retry_info,
|
|
67
67
|
)
|
|
68
|
-
def get_token(self):
|
|
68
|
+
def get_token(self) -> str | None:
|
|
69
|
+
if self._app is None:
|
|
70
|
+
return None
|
|
71
|
+
assert isinstance(self._app, msal.PublicClientApplication)
|
|
69
72
|
accounts = self._app.get_accounts()
|
|
70
73
|
if len(accounts) == 0:
|
|
71
74
|
return None
|
|
@@ -82,6 +85,18 @@ class AuthProvider:
|
|
|
82
85
|
|
|
83
86
|
return {"Authorization": "Bearer " + token}
|
|
84
87
|
|
|
88
|
+
def invalidate_access_tokens(self):
|
|
89
|
+
if self._app is not None:
|
|
90
|
+
assert isinstance(self._app, msal.PublicClientApplication)
|
|
91
|
+
assert isinstance(self._app.token_cache, PersistedTokenCache)
|
|
92
|
+
access_tokens = list(
|
|
93
|
+
self._app.token_cache.search(
|
|
94
|
+
self._app.token_cache.CredentialType.ACCESS_TOKEN
|
|
95
|
+
)
|
|
96
|
+
)
|
|
97
|
+
for access_token in access_tokens:
|
|
98
|
+
self._app.token_cache.remove_at(access_token)
|
|
99
|
+
|
|
85
100
|
def store_shared_access_key_for_case(self, case_uuid, token):
|
|
86
101
|
os.makedirs(get_token_dir(), mode=0o700, exist_ok=True)
|
|
87
102
|
with open(
|
sumo/wrapper/_version.py
CHANGED
|
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
|
|
|
18
18
|
commit_id: str | None
|
|
19
19
|
__commit_id__: str | None
|
|
20
20
|
|
|
21
|
-
__version__ = version = '1.
|
|
22
|
-
__version_tuple__ = version_tuple = (1,
|
|
21
|
+
__version__ = version = '1.11.0'
|
|
22
|
+
__version_tuple__ = version_tuple = (1, 11, 0)
|
|
23
23
|
|
|
24
24
|
__commit_id__ = commit_id = None
|
sumo/wrapper/sumo_client.py
CHANGED
|
@@ -188,6 +188,11 @@ class SumoClient:
|
|
|
188
188
|
return None
|
|
189
189
|
return self.auth.get_token()
|
|
190
190
|
|
|
191
|
+
def invalidate_access_tokens(self):
|
|
192
|
+
if self.auth is None:
|
|
193
|
+
return None
|
|
194
|
+
return self.auth.invalidate_access_tokens()
|
|
195
|
+
|
|
191
196
|
@property
|
|
192
197
|
def blob_client(self) -> BlobClient:
|
|
193
198
|
"""Get blob_client
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
sumo/__init__.py,sha256=ftS-xRPSH-vU7fIHlnZQaCTWbNvs4owJivNW65kzsIM,85
|
|
2
2
|
sumo/wrapper/__init__.py,sha256=srvnJZqUgtAWhvjsM8ovl4dPcppZNU8MXRZszicrUoA,235
|
|
3
|
-
sumo/wrapper/_auth_provider.py,sha256=
|
|
3
|
+
sumo/wrapper/_auth_provider.py,sha256=lE74AFtwBqWNK9rCje6BdW9NaL8Kip7HQJVQ-eE_rxM,17527
|
|
4
4
|
sumo/wrapper/_blob_client.py,sha256=QLJmgjFZk44jgxhbFed95JbQ1a69xpO6eQJFuTKyU3A,1608
|
|
5
5
|
sumo/wrapper/_decorators.py,sha256=ZwyrWkfAXiGNSgYsQSEXA13D-WIQM2XPf0v2z9N8HyQ,1002
|
|
6
6
|
sumo/wrapper/_logging.py,sha256=Au77-3D9eYTK0FhaNQLQV6Pl4sKJi0PpQjcUfCckLus,1144
|
|
7
7
|
sumo/wrapper/_retry_strategy.py,sha256=D-4aayNv9BrDrEYMRhkhod6szvyw5d9oZvTekAa4BBI,2624
|
|
8
|
-
sumo/wrapper/_version.py,sha256=
|
|
8
|
+
sumo/wrapper/_version.py,sha256=R0RDH1rwZiqBhqHMW83hcuYNyE-V-M_xo-8QDd6aazQ,522
|
|
9
9
|
sumo/wrapper/login.py,sha256=PtpQ5Qi8Gm1N0hMnE79Je4QvQ8JMuKqa46TwZgjHRnM,2328
|
|
10
|
-
sumo/wrapper/sumo_client.py,sha256=
|
|
11
|
-
sumo_wrapper_python-1.
|
|
12
|
-
sumo_wrapper_python-1.
|
|
13
|
-
sumo_wrapper_python-1.
|
|
14
|
-
sumo_wrapper_python-1.
|
|
15
|
-
sumo_wrapper_python-1.
|
|
16
|
-
sumo_wrapper_python-1.
|
|
10
|
+
sumo/wrapper/sumo_client.py,sha256=FKGSIDMMQQdWitZc68afc-Jgdw4bi9uK_8GutlvucPw,24537
|
|
11
|
+
sumo_wrapper_python-1.11.0.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
12
|
+
sumo_wrapper_python-1.11.0.dist-info/METADATA,sha256=I68WxWzuRaRq3ACd9zqyH_wL4WY6aUX9rTecjYdfSSQ,14616
|
|
13
|
+
sumo_wrapper_python-1.11.0.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
|
|
14
|
+
sumo_wrapper_python-1.11.0.dist-info/entry_points.txt,sha256=V_vGky2C3He5vohJAxnBdvpt_fqfUDFj5irUm9HtoFc,55
|
|
15
|
+
sumo_wrapper_python-1.11.0.dist-info/top_level.txt,sha256=rLbKyH9rWgCj3PoLeR7fvC5X8vCaUc5LF8-Y_GBWZL0,5
|
|
16
|
+
sumo_wrapper_python-1.11.0.dist-info/RECORD,,
|
{sumo_wrapper_python-1.10.0.dist-info → sumo_wrapper_python-1.11.0.dist-info}/entry_points.txt
RENAMED
|
File without changes
|
{sumo_wrapper_python-1.10.0.dist-info → sumo_wrapper_python-1.11.0.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|
|
File without changes
|