mcp-sharepoint-us 2.0.7__py3-none-any.whl → 2.0.9__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.
Potentially problematic release.
This version of mcp-sharepoint-us might be problematic. Click here for more details.
- mcp_sharepoint/auth.py +10 -3
- {mcp_sharepoint_us-2.0.7.dist-info → mcp_sharepoint_us-2.0.9.dist-info}/METADATA +1 -1
- mcp_sharepoint_us-2.0.9.dist-info/RECORD +9 -0
- mcp_sharepoint_us-2.0.7.dist-info/RECORD +0 -9
- {mcp_sharepoint_us-2.0.7.dist-info → mcp_sharepoint_us-2.0.9.dist-info}/WHEEL +0 -0
- {mcp_sharepoint_us-2.0.7.dist-info → mcp_sharepoint_us-2.0.9.dist-info}/entry_points.txt +0 -0
- {mcp_sharepoint_us-2.0.7.dist-info → mcp_sharepoint_us-2.0.9.dist-info}/licenses/LICENSE +0 -0
- {mcp_sharepoint_us-2.0.7.dist-info → mcp_sharepoint_us-2.0.9.dist-info}/top_level.txt +0 -0
mcp_sharepoint/auth.py
CHANGED
|
@@ -102,14 +102,18 @@ class SharePointAuthenticator:
|
|
|
102
102
|
|
|
103
103
|
logger.info(f"Using SharePoint root scope: {sharepoint_root}/.default")
|
|
104
104
|
|
|
105
|
-
def acquire_token() ->
|
|
105
|
+
def acquire_token() -> dict:
|
|
106
106
|
"""
|
|
107
107
|
Token callback used by office365 ClientContext.
|
|
108
108
|
Retries transient network errors like ConnectionResetError(104).
|
|
109
|
+
Returns a dict with tokenType and accessToken as expected by the library.
|
|
109
110
|
"""
|
|
110
111
|
now = int(time.time())
|
|
111
112
|
if self._access_token and now < (self._access_token_exp - 60):
|
|
112
|
-
return
|
|
113
|
+
return {
|
|
114
|
+
"tokenType": "Bearer",
|
|
115
|
+
"accessToken": self._access_token
|
|
116
|
+
}
|
|
113
117
|
|
|
114
118
|
last_err = None
|
|
115
119
|
for attempt in range(1, 6): # 5 attempts
|
|
@@ -133,7 +137,10 @@ class SharePointAuthenticator:
|
|
|
133
137
|
self._access_token_exp = int(time.time()) + expires_in
|
|
134
138
|
|
|
135
139
|
logger.info(f"Successfully acquired token for {self.site_url}")
|
|
136
|
-
return
|
|
140
|
+
return {
|
|
141
|
+
"tokenType": "Bearer",
|
|
142
|
+
"accessToken": token
|
|
143
|
+
}
|
|
137
144
|
|
|
138
145
|
except Exception as e:
|
|
139
146
|
last_err = e
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
mcp_sharepoint/__init__.py,sha256=vnnELXIj7FdcW8KIYoeXlwq4FblG63RTrXGGSO8KdSU,19412
|
|
2
|
+
mcp_sharepoint/__main__.py,sha256=4iVDdDZx4rQ4Zo-x0RaCrT-NKeGObIz_ks3YF8di2nA,132
|
|
3
|
+
mcp_sharepoint/auth.py,sha256=EVfLtHSrwIAqxchNr54Iy-oaHYUe6QIWYjQf-4qSjFs,13160
|
|
4
|
+
mcp_sharepoint_us-2.0.9.dist-info/licenses/LICENSE,sha256=SRM8juGH4GjIqnl5rrp-P-S5mW5h2mINOPx5-wOZG6s,1112
|
|
5
|
+
mcp_sharepoint_us-2.0.9.dist-info/METADATA,sha256=s6X5nohjR7tLPPNoY1gG9iu8FO1rd_gbYSEBWjnRKWY,11379
|
|
6
|
+
mcp_sharepoint_us-2.0.9.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
7
|
+
mcp_sharepoint_us-2.0.9.dist-info/entry_points.txt,sha256=UZOa_7OLI41rmsErbvnSz9RahPMGQVcqZUFMphOcjbY,57
|
|
8
|
+
mcp_sharepoint_us-2.0.9.dist-info/top_level.txt,sha256=R6mRoWe61lz4kUSKGV6S2XVbE7825xfC_J-ouZIYpuo,15
|
|
9
|
+
mcp_sharepoint_us-2.0.9.dist-info/RECORD,,
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
mcp_sharepoint/__init__.py,sha256=vnnELXIj7FdcW8KIYoeXlwq4FblG63RTrXGGSO8KdSU,19412
|
|
2
|
-
mcp_sharepoint/__main__.py,sha256=4iVDdDZx4rQ4Zo-x0RaCrT-NKeGObIz_ks3YF8di2nA,132
|
|
3
|
-
mcp_sharepoint/auth.py,sha256=Fnc0VhGCFWsiLNHzrH2DB1w2Tnz8U2gvSLOVO1tgE6E,12865
|
|
4
|
-
mcp_sharepoint_us-2.0.7.dist-info/licenses/LICENSE,sha256=SRM8juGH4GjIqnl5rrp-P-S5mW5h2mINOPx5-wOZG6s,1112
|
|
5
|
-
mcp_sharepoint_us-2.0.7.dist-info/METADATA,sha256=bQPSFe9whxi949ewDd3j_9w69_rz7c5Cg8M87YOz8hc,11379
|
|
6
|
-
mcp_sharepoint_us-2.0.7.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
7
|
-
mcp_sharepoint_us-2.0.7.dist-info/entry_points.txt,sha256=UZOa_7OLI41rmsErbvnSz9RahPMGQVcqZUFMphOcjbY,57
|
|
8
|
-
mcp_sharepoint_us-2.0.7.dist-info/top_level.txt,sha256=R6mRoWe61lz4kUSKGV6S2XVbE7825xfC_J-ouZIYpuo,15
|
|
9
|
-
mcp_sharepoint_us-2.0.7.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|