microsoft-agents-authentication-msal 0.6.0.dev1__tar.gz → 0.6.0.dev4__tar.gz
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.
- {microsoft_agents_authentication_msal-0.6.0.dev1 → microsoft_agents_authentication_msal-0.6.0.dev4}/PKG-INFO +2 -2
- {microsoft_agents_authentication_msal-0.6.0.dev1 → microsoft_agents_authentication_msal-0.6.0.dev4}/microsoft_agents/authentication/msal/msal_auth.py +10 -13
- {microsoft_agents_authentication_msal-0.6.0.dev1 → microsoft_agents_authentication_msal-0.6.0.dev4}/microsoft_agents_authentication_msal.egg-info/PKG-INFO +2 -2
- {microsoft_agents_authentication_msal-0.6.0.dev1 → microsoft_agents_authentication_msal-0.6.0.dev4}/microsoft_agents_authentication_msal.egg-info/requires.txt +1 -1
- {microsoft_agents_authentication_msal-0.6.0.dev1 → microsoft_agents_authentication_msal-0.6.0.dev4}/LICENSE +0 -0
- {microsoft_agents_authentication_msal-0.6.0.dev1 → microsoft_agents_authentication_msal-0.6.0.dev4}/microsoft_agents/authentication/msal/__init__.py +0 -0
- {microsoft_agents_authentication_msal-0.6.0.dev1 → microsoft_agents_authentication_msal-0.6.0.dev4}/microsoft_agents/authentication/msal/msal_connection_manager.py +0 -0
- {microsoft_agents_authentication_msal-0.6.0.dev1 → microsoft_agents_authentication_msal-0.6.0.dev4}/microsoft_agents_authentication_msal.egg-info/SOURCES.txt +0 -0
- {microsoft_agents_authentication_msal-0.6.0.dev1 → microsoft_agents_authentication_msal-0.6.0.dev4}/microsoft_agents_authentication_msal.egg-info/dependency_links.txt +0 -0
- {microsoft_agents_authentication_msal-0.6.0.dev1 → microsoft_agents_authentication_msal-0.6.0.dev4}/microsoft_agents_authentication_msal.egg-info/top_level.txt +0 -0
- {microsoft_agents_authentication_msal-0.6.0.dev1 → microsoft_agents_authentication_msal-0.6.0.dev4}/pyproject.toml +0 -0
- {microsoft_agents_authentication_msal-0.6.0.dev1 → microsoft_agents_authentication_msal-0.6.0.dev4}/readme.md +0 -0
- {microsoft_agents_authentication_msal-0.6.0.dev1 → microsoft_agents_authentication_msal-0.6.0.dev4}/setup.cfg +0 -0
- {microsoft_agents_authentication_msal-0.6.0.dev1 → microsoft_agents_authentication_msal-0.6.0.dev4}/setup.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: microsoft-agents-authentication-msal
|
|
3
|
-
Version: 0.6.0.
|
|
3
|
+
Version: 0.6.0.dev4
|
|
4
4
|
Summary: A msal-based authentication library for Microsoft Agents
|
|
5
5
|
Author: Microsoft Corporation
|
|
6
6
|
License-Expression: MIT
|
|
@@ -15,7 +15,7 @@ Classifier: Operating System :: OS Independent
|
|
|
15
15
|
Requires-Python: >=3.10
|
|
16
16
|
Description-Content-Type: text/markdown
|
|
17
17
|
License-File: LICENSE
|
|
18
|
-
Requires-Dist: microsoft-agents-hosting-core==0.6.0.
|
|
18
|
+
Requires-Dist: microsoft-agents-hosting-core==0.6.0.dev4
|
|
19
19
|
Requires-Dist: msal>=1.31.1
|
|
20
20
|
Requires-Dist: requests>=2.32.3
|
|
21
21
|
Requires-Dist: cryptography>=44.0.0
|
|
@@ -19,6 +19,8 @@ from cryptography.x509 import load_pem_x509_certificate
|
|
|
19
19
|
from cryptography.hazmat.backends import default_backend
|
|
20
20
|
from cryptography.hazmat.primitives import hashes
|
|
21
21
|
|
|
22
|
+
from microsoft_agents.activity._utils import _DeferredString
|
|
23
|
+
|
|
22
24
|
from microsoft_agents.hosting.core import (
|
|
23
25
|
AuthTypes,
|
|
24
26
|
AccessTokenProviderBase,
|
|
@@ -28,18 +30,6 @@ from microsoft_agents.hosting.core import (
|
|
|
28
30
|
logger = logging.getLogger(__name__)
|
|
29
31
|
|
|
30
32
|
|
|
31
|
-
# this is deferred because jwt.decode is expensive and we don't want to do it unless we
|
|
32
|
-
# have logging.DEBUG enabled
|
|
33
|
-
class _DeferredLogOfBlueprintId:
|
|
34
|
-
def __init__(self, jwt_token: str):
|
|
35
|
-
self.jwt_token = jwt_token
|
|
36
|
-
|
|
37
|
-
def __str__(self):
|
|
38
|
-
payload = jwt.decode(self.jwt_token, options={"verify_signature": False})
|
|
39
|
-
agentic_blueprint_id = payload.get("xms_par_app_azp")
|
|
40
|
-
return f"Agentic blueprint id: {agentic_blueprint_id}"
|
|
41
|
-
|
|
42
|
-
|
|
43
33
|
async def _async_acquire_token_for_client(msal_auth_client, *args, **kwargs):
|
|
44
34
|
"""MSAL in Python does not support async, so we use asyncio.to_thread to run it in
|
|
45
35
|
a separate thread and avoid blocking the event loop
|
|
@@ -328,7 +318,14 @@ class MsalAuth(AccessTokenProviderBase):
|
|
|
328
318
|
)
|
|
329
319
|
raise ValueError(f"Failed to acquire token. {str(agentic_instance_token)}")
|
|
330
320
|
|
|
331
|
-
logger.debug(
|
|
321
|
+
logger.debug(
|
|
322
|
+
"Agentic blueprint id: %s",
|
|
323
|
+
_DeferredString(
|
|
324
|
+
lambda: jwt.decode(token, options={"verify_signature": False}).get(
|
|
325
|
+
"xms_par_app_azp"
|
|
326
|
+
)
|
|
327
|
+
),
|
|
328
|
+
)
|
|
332
329
|
|
|
333
330
|
return agentic_instance_token["access_token"], agent_token_result
|
|
334
331
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: microsoft-agents-authentication-msal
|
|
3
|
-
Version: 0.6.0.
|
|
3
|
+
Version: 0.6.0.dev4
|
|
4
4
|
Summary: A msal-based authentication library for Microsoft Agents
|
|
5
5
|
Author: Microsoft Corporation
|
|
6
6
|
License-Expression: MIT
|
|
@@ -15,7 +15,7 @@ Classifier: Operating System :: OS Independent
|
|
|
15
15
|
Requires-Python: >=3.10
|
|
16
16
|
Description-Content-Type: text/markdown
|
|
17
17
|
License-File: LICENSE
|
|
18
|
-
Requires-Dist: microsoft-agents-hosting-core==0.6.0.
|
|
18
|
+
Requires-Dist: microsoft-agents-hosting-core==0.6.0.dev4
|
|
19
19
|
Requires-Dist: msal>=1.31.1
|
|
20
20
|
Requires-Dist: requests>=2.32.3
|
|
21
21
|
Requires-Dist: cryptography>=44.0.0
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|