microsoft-agents-hosting-fastapi 1.10.0.dev4__tar.gz → 1.10.0.dev6__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.
Files changed (23) hide show
  1. {microsoft_agents_hosting_fastapi-1.10.0.dev4/microsoft_agents_hosting_fastapi.egg-info → microsoft_agents_hosting_fastapi-1.10.0.dev6}/PKG-INFO +2 -2
  2. microsoft_agents_hosting_fastapi-1.10.0.dev6/VERSION.txt +1 -0
  3. {microsoft_agents_hosting_fastapi-1.10.0.dev4 → microsoft_agents_hosting_fastapi-1.10.0.dev6}/microsoft_agents/hosting/fastapi/jwt_authorization_middleware.py +8 -6
  4. {microsoft_agents_hosting_fastapi-1.10.0.dev4 → microsoft_agents_hosting_fastapi-1.10.0.dev6/microsoft_agents_hosting_fastapi.egg-info}/PKG-INFO +2 -2
  5. microsoft_agents_hosting_fastapi-1.10.0.dev6/microsoft_agents_hosting_fastapi.egg-info/requires.txt +3 -0
  6. microsoft_agents_hosting_fastapi-1.10.0.dev4/VERSION.txt +0 -1
  7. microsoft_agents_hosting_fastapi-1.10.0.dev4/microsoft_agents_hosting_fastapi.egg-info/requires.txt +0 -3
  8. {microsoft_agents_hosting_fastapi-1.10.0.dev4 → microsoft_agents_hosting_fastapi-1.10.0.dev6}/LICENSE +0 -0
  9. {microsoft_agents_hosting_fastapi-1.10.0.dev4 → microsoft_agents_hosting_fastapi-1.10.0.dev6}/MANIFEST.in +0 -0
  10. {microsoft_agents_hosting_fastapi-1.10.0.dev4 → microsoft_agents_hosting_fastapi-1.10.0.dev6}/microsoft_agents/hosting/fastapi/__init__.py +0 -0
  11. {microsoft_agents_hosting_fastapi-1.10.0.dev4 → microsoft_agents_hosting_fastapi-1.10.0.dev6}/microsoft_agents/hosting/fastapi/_fastapi_request_adapter.py +0 -0
  12. {microsoft_agents_hosting_fastapi-1.10.0.dev4 → microsoft_agents_hosting_fastapi-1.10.0.dev6}/microsoft_agents/hosting/fastapi/_start_agent_process.py +0 -0
  13. {microsoft_agents_hosting_fastapi-1.10.0.dev4 → microsoft_agents_hosting_fastapi-1.10.0.dev6}/microsoft_agents/hosting/fastapi/agent_http_adapter.py +0 -0
  14. {microsoft_agents_hosting_fastapi-1.10.0.dev4 → microsoft_agents_hosting_fastapi-1.10.0.dev6}/microsoft_agents/hosting/fastapi/channel_service_route_table.py +0 -0
  15. {microsoft_agents_hosting_fastapi-1.10.0.dev4 → microsoft_agents_hosting_fastapi-1.10.0.dev6}/microsoft_agents/hosting/fastapi/cloud_adapter.py +0 -0
  16. {microsoft_agents_hosting_fastapi-1.10.0.dev4 → microsoft_agents_hosting_fastapi-1.10.0.dev6}/microsoft_agents/hosting/fastapi/py.typed +0 -0
  17. {microsoft_agents_hosting_fastapi-1.10.0.dev4 → microsoft_agents_hosting_fastapi-1.10.0.dev6}/microsoft_agents_hosting_fastapi.egg-info/SOURCES.txt +0 -0
  18. {microsoft_agents_hosting_fastapi-1.10.0.dev4 → microsoft_agents_hosting_fastapi-1.10.0.dev6}/microsoft_agents_hosting_fastapi.egg-info/dependency_links.txt +0 -0
  19. {microsoft_agents_hosting_fastapi-1.10.0.dev4 → microsoft_agents_hosting_fastapi-1.10.0.dev6}/microsoft_agents_hosting_fastapi.egg-info/top_level.txt +0 -0
  20. {microsoft_agents_hosting_fastapi-1.10.0.dev4 → microsoft_agents_hosting_fastapi-1.10.0.dev6}/pyproject.toml +0 -0
  21. {microsoft_agents_hosting_fastapi-1.10.0.dev4 → microsoft_agents_hosting_fastapi-1.10.0.dev6}/readme.md +0 -0
  22. {microsoft_agents_hosting_fastapi-1.10.0.dev4 → microsoft_agents_hosting_fastapi-1.10.0.dev6}/setup.cfg +0 -0
  23. {microsoft_agents_hosting_fastapi-1.10.0.dev4 → microsoft_agents_hosting_fastapi-1.10.0.dev6}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: microsoft-agents-hosting-fastapi
3
- Version: 1.10.0.dev4
3
+ Version: 1.10.0.dev6
4
4
  Summary: Integration library for Microsoft Agents with FastAPI
5
5
  Author: Microsoft Corporation
6
6
  License-Expression: MIT
@@ -10,7 +10,7 @@ Classifier: Operating System :: OS Independent
10
10
  Requires-Python: >=3.10
11
11
  Description-Content-Type: text/markdown
12
12
  License-File: LICENSE
13
- Requires-Dist: microsoft-agents-hosting-core==1.10.0.dev4
13
+ Requires-Dist: microsoft-agents-hosting-core==1.10.0.dev6
14
14
  Requires-Dist: fastapi>=0.104.0
15
15
  Requires-Dist: starlette>=1.0.1
16
16
  Dynamic: license-file
@@ -0,0 +1 @@
1
+ 1.10.0.dev6
@@ -32,14 +32,12 @@ class JwtAuthorizationMiddleware:
32
32
  return
33
33
 
34
34
  app = scope.get("app")
35
- state = getattr(app, "state", None) if app else None
36
- auth_config: AgentAuthConfiguration | None = getattr(
37
- state, "agent_configuration", None
38
- )
39
35
 
40
36
  request = Request(scope, receive=receive)
41
37
  res = await _authorize_request(
42
- request.headers.get("Authorization"), auth_config
38
+ request.headers.get("Authorization"),
39
+ getattr(getattr(app, "state", None), "agent_configuration", None),
40
+ cache_key=app,
43
41
  )
44
42
 
45
43
  if isinstance(res, HttpResponse):
@@ -68,7 +66,11 @@ def jwt_authorization_decorator(func):
68
66
 
69
67
  auth_header = request.headers.get("Authorization")
70
68
 
71
- res = await _authorize_request(auth_header, auth_config)
69
+ res = await _authorize_request(
70
+ auth_header,
71
+ auth_config,
72
+ cache_key=request.app,
73
+ )
72
74
  if isinstance(res, HttpResponse):
73
75
  return JSONResponse(content=res.body, status_code=res.status_code)
74
76
  request.state.claims_identity = res
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: microsoft-agents-hosting-fastapi
3
- Version: 1.10.0.dev4
3
+ Version: 1.10.0.dev6
4
4
  Summary: Integration library for Microsoft Agents with FastAPI
5
5
  Author: Microsoft Corporation
6
6
  License-Expression: MIT
@@ -10,7 +10,7 @@ Classifier: Operating System :: OS Independent
10
10
  Requires-Python: >=3.10
11
11
  Description-Content-Type: text/markdown
12
12
  License-File: LICENSE
13
- Requires-Dist: microsoft-agents-hosting-core==1.10.0.dev4
13
+ Requires-Dist: microsoft-agents-hosting-core==1.10.0.dev6
14
14
  Requires-Dist: fastapi>=0.104.0
15
15
  Requires-Dist: starlette>=1.0.1
16
16
  Dynamic: license-file
@@ -0,0 +1,3 @@
1
+ microsoft-agents-hosting-core==1.10.0.dev6
2
+ fastapi>=0.104.0
3
+ starlette>=1.0.1
@@ -1 +0,0 @@
1
- 1.10.0.dev4
@@ -1,3 +0,0 @@
1
- microsoft-agents-hosting-core==1.10.0.dev4
2
- fastapi>=0.104.0
3
- starlette>=1.0.1