tba-protocol-oidc 0.4.0.dev2__tar.gz → 0.4.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.
Files changed (36) hide show
  1. {tba_protocol_oidc-0.4.0.dev2 → tba_protocol_oidc-0.4.0.dev4}/PKG-INFO +4 -5
  2. {tba_protocol_oidc-0.4.0.dev2 → tba_protocol_oidc-0.4.0.dev4}/pyproject.toml +4 -5
  3. {tba_protocol_oidc-0.4.0.dev2 → tba_protocol_oidc-0.4.0.dev4}/src/tba_protocol_oidc/standards/_rp_logout_validation.py +4 -10
  4. {tba_protocol_oidc-0.4.0.dev2 → tba_protocol_oidc-0.4.0.dev4}/src/tba_protocol_oidc/standards/rp_initiated_logout.py +13 -19
  5. {tba_protocol_oidc-0.4.0.dev2 → tba_protocol_oidc-0.4.0.dev4}/README.md +0 -0
  6. {tba_protocol_oidc-0.4.0.dev2 → tba_protocol_oidc-0.4.0.dev4}/src/tba_protocol_oidc/__init__.py +0 -0
  7. {tba_protocol_oidc-0.4.0.dev2 → tba_protocol_oidc-0.4.0.dev4}/src/tba_protocol_oidc/bindings.py +0 -0
  8. {tba_protocol_oidc-0.4.0.dev2 → tba_protocol_oidc-0.4.0.dev4}/src/tba_protocol_oidc/capability_requirements.py +0 -0
  9. {tba_protocol_oidc-0.4.0.dev2 → tba_protocol_oidc-0.4.0.dev4}/src/tba_protocol_oidc/claim_sets.py +0 -0
  10. {tba_protocol_oidc-0.4.0.dev2 → tba_protocol_oidc-0.4.0.dev4}/src/tba_protocol_oidc/claims.py +0 -0
  11. {tba_protocol_oidc-0.4.0.dev2 → tba_protocol_oidc-0.4.0.dev4}/src/tba_protocol_oidc/compatibility.py +0 -0
  12. {tba_protocol_oidc-0.4.0.dev2 → tba_protocol_oidc-0.4.0.dev4}/src/tba_protocol_oidc/discovery.py +0 -0
  13. {tba_protocol_oidc-0.4.0.dev2 → tba_protocol_oidc-0.4.0.dev4}/src/tba_protocol_oidc/eap_acr_values.py +0 -0
  14. {tba_protocol_oidc-0.4.0.dev2 → tba_protocol_oidc-0.4.0.dev4}/src/tba_protocol_oidc/errors.py +0 -0
  15. {tba_protocol_oidc-0.4.0.dev2 → tba_protocol_oidc-0.4.0.dev4}/src/tba_protocol_oidc/features.py +0 -0
  16. {tba_protocol_oidc-0.4.0.dev2 → tba_protocol_oidc-0.4.0.dev4}/src/tba_protocol_oidc/id_token.py +0 -0
  17. {tba_protocol_oidc-0.4.0.dev2 → tba_protocol_oidc-0.4.0.dev4}/src/tba_protocol_oidc/id_token_profile.py +0 -0
  18. {tba_protocol_oidc-0.4.0.dev2 → tba_protocol_oidc-0.4.0.dev4}/src/tba_protocol_oidc/jwks_service.py +0 -0
  19. {tba_protocol_oidc-0.4.0.dev2 → tba_protocol_oidc-0.4.0.dev4}/src/tba_protocol_oidc/migrations.py +0 -0
  20. {tba_protocol_oidc-0.4.0.dev2 → tba_protocol_oidc-0.4.0.dev4}/src/tba_protocol_oidc/provider.py +0 -0
  21. {tba_protocol_oidc-0.4.0.dev2 → tba_protocol_oidc-0.4.0.dev4}/src/tba_protocol_oidc/py.typed +0 -0
  22. {tba_protocol_oidc-0.4.0.dev2 → tba_protocol_oidc-0.4.0.dev4}/src/tba_protocol_oidc/reusable_components.py +0 -0
  23. {tba_protocol_oidc-0.4.0.dev2 → tba_protocol_oidc-0.4.0.dev4}/src/tba_protocol_oidc/schemas.py +0 -0
  24. {tba_protocol_oidc-0.4.0.dev2 → tba_protocol_oidc-0.4.0.dev4}/src/tba_protocol_oidc/standards/__init__.py +0 -0
  25. {tba_protocol_oidc-0.4.0.dev2 → tba_protocol_oidc-0.4.0.dev4}/src/tba_protocol_oidc/standards/backchannel_logout.py +0 -0
  26. {tba_protocol_oidc-0.4.0.dev2 → tba_protocol_oidc-0.4.0.dev4}/src/tba_protocol_oidc/standards/core.py +0 -0
  27. {tba_protocol_oidc-0.4.0.dev2 → tba_protocol_oidc-0.4.0.dev4}/src/tba_protocol_oidc/standards/discovery.py +0 -0
  28. {tba_protocol_oidc-0.4.0.dev2 → tba_protocol_oidc-0.4.0.dev4}/src/tba_protocol_oidc/standards/discovery_metadata.py +0 -0
  29. {tba_protocol_oidc-0.4.0.dev2 → tba_protocol_oidc-0.4.0.dev4}/src/tba_protocol_oidc/standards/frontchannel_logout.py +0 -0
  30. {tba_protocol_oidc-0.4.0.dev2 → tba_protocol_oidc-0.4.0.dev4}/src/tba_protocol_oidc/standards/id_token.py +0 -0
  31. {tba_protocol_oidc-0.4.0.dev2 → tba_protocol_oidc-0.4.0.dev4}/src/tba_protocol_oidc/standards/openid4vc.py +0 -0
  32. {tba_protocol_oidc-0.4.0.dev2 → tba_protocol_oidc-0.4.0.dev4}/src/tba_protocol_oidc/standards/session_mgmt.py +0 -0
  33. {tba_protocol_oidc-0.4.0.dev2 → tba_protocol_oidc-0.4.0.dev4}/src/tba_protocol_oidc/standards/set_delivery.py +0 -0
  34. {tba_protocol_oidc-0.4.0.dev2 → tba_protocol_oidc-0.4.0.dev4}/src/tba_protocol_oidc/standards/userinfo.py +0 -0
  35. {tba_protocol_oidc-0.4.0.dev2 → tba_protocol_oidc-0.4.0.dev4}/src/tba_protocol_oidc/tenant_discovery.py +0 -0
  36. {tba_protocol_oidc-0.4.0.dev2 → tba_protocol_oidc-0.4.0.dev4}/src/tba_protocol_oidc/versions.py +0 -0
@@ -1,15 +1,14 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tba-protocol-oidc
3
- Version: 0.4.0.dev2
3
+ Version: 0.4.0.dev4
4
4
  Summary: OpenID Connect provider protocol implementation package for the TBA package suite.
5
5
  License-Expression: Apache-2.0
6
6
  Keywords: tigrbl,auth,protocol,oidc,openid-connect,id-token,userinfo,discovery,logout,iam
7
- Requires-Python: >=3.10,<3.15
7
+ Requires-Python: >=3.11,<3.15
8
8
  Classifier: Development Status :: 3 - Alpha
9
9
  Classifier: Intended Audience :: Developers
10
10
  Classifier: License :: OSI Approved :: Apache Software License
11
11
  Classifier: Programming Language :: Python :: 3
12
- Classifier: Programming Language :: Python :: 3.10
13
12
  Classifier: Programming Language :: Python :: 3.11
14
13
  Classifier: Programming Language :: Python :: 3.12
15
14
  Classifier: Programming Language :: Python :: 3.13
@@ -19,7 +18,7 @@ Classifier: Typing :: Typed
19
18
  Classifier: Topic :: Internet :: WWW/HTTP
20
19
  Classifier: Topic :: Security
21
20
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
22
- Requires-Dist: pydantic (==2.12.5)
21
+ Requires-Dist: pydantic (>=2.12.5,<3)
23
22
  Requires-Dist: tba-concrete-claim-access-token-hash (==0.4.0.dev2)
24
23
  Requires-Dist: tba-concrete-claim-address (==0.4.0.dev2)
25
24
  Requires-Dist: tba-concrete-claim-address-country-code (==0.4.0.dev2)
@@ -65,7 +64,7 @@ Requires-Dist: tba-concrete-pairwise-subject-identifier (==0.4.0.dev2)
65
64
  Requires-Dist: tba-concrete-public-subject-identifier (==0.4.0.dev2)
66
65
  Requires-Dist: tba-contracts-identity (==0.4.0.dev2)
67
66
  Requires-Dist: tba-primitives-identity (==0.4.0.dev2)
68
- Requires-Dist: tba-protocol-oauth (==0.4.0.dev2)
67
+ Requires-Dist: tba-protocol-oauth (==0.4.0.dev5)
69
68
  Requires-Dist: tba-provider-claims-local (==0.1.0)
70
69
  Requires-Dist: tba-provider-identity-jose (==0.4.0.dev2)
71
70
  Project-URL: Homepage, https://github.com/tigrbl/tigrbl_auth
@@ -1,9 +1,9 @@
1
1
  [project]
2
2
  name = "tba-protocol-oidc"
3
- version = "0.4.0.dev2"
3
+ version = "0.4.0.dev4"
4
4
  description = "OpenID Connect provider protocol implementation package for the TBA package suite."
5
5
  readme = "README.md"
6
- requires-python = ">=3.10,<3.15"
6
+ requires-python = ">=3.11,<3.15"
7
7
  license = "Apache-2.0"
8
8
  keywords = [
9
9
  "tigrbl",
@@ -22,7 +22,6 @@ classifiers = [
22
22
  "Intended Audience :: Developers",
23
23
  "License :: OSI Approved :: Apache Software License",
24
24
  "Programming Language :: Python :: 3",
25
- "Programming Language :: Python :: 3.10",
26
25
  "Programming Language :: Python :: 3.11",
27
26
  "Programming Language :: Python :: 3.12",
28
27
  "Programming Language :: Python :: 3.13",
@@ -34,8 +33,8 @@ classifiers = [
34
33
  "Topic :: Software Development :: Libraries :: Python Modules",
35
34
  ]
36
35
  dependencies = [
37
- "pydantic==2.12.5",
38
- "tba-protocol-oauth==0.4.0.dev2",
36
+ "pydantic>=2.12.5,<3",
37
+ "tba-protocol-oauth==0.4.0.dev5",
39
38
  "tba-contracts-identity==0.4.0.dev2",
40
39
  "tba-primitives-identity==0.4.0.dev2",
41
40
  "tba-provider-identity-jose==0.4.0.dev2",
@@ -2,6 +2,8 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
+ from http import HTTPStatus
6
+
5
7
  import base64
6
8
  import json
7
9
  from typing import Any, Final
@@ -10,23 +12,15 @@ from urllib.parse import urlparse
10
12
  from uuid import UUID
11
13
 
12
14
  try: # dependency-light import path for checkpoint evidence generation
13
- from http import HTTPStatus as status
14
15
  from tigrbl.runtime.status import HTTPException
15
16
  except Exception: # pragma: no cover - exercised in dependency-light tests
16
17
 
17
- class _FallbackStatus:
18
- HTTP_400_BAD_REQUEST = 400
19
- HTTP_401_UNAUTHORIZED = 401
20
- HTTP_404_NOT_FOUND = 404
21
-
22
18
  class HTTPException(Exception):
23
19
  def __init__(self, status_code: int, detail: Any):
24
20
  super().__init__(detail)
25
21
  self.status_code = status_code
26
22
  self.detail = detail
27
23
 
28
- status = _FallbackStatus()
29
-
30
24
  STATUS: Final[str] = "rp-initiated-logout-runtime"
31
25
 
32
26
 
@@ -96,7 +90,7 @@ def _require_https_if_present(uri: str) -> None:
96
90
  parsed = urlparse(uri)
97
91
  if parsed.scheme != "https":
98
92
  raise HTTPException(
99
- status.HTTP_400_BAD_REQUEST, "post_logout_redirect_uri must use https"
93
+ HTTPStatus.BAD_REQUEST, "post_logout_redirect_uri must use https"
100
94
  )
101
95
 
102
96
 
@@ -110,4 +104,4 @@ def assert_logout_session_active(session_row) -> None:
110
104
  "ended",
111
105
  "revoked",
112
106
  }:
113
- raise HTTPException(status.HTTP_400_BAD_REQUEST, {"error": "expired_session"})
107
+ raise HTTPException(HTTPStatus.BAD_REQUEST, {"error": "expired_session"})
@@ -2,6 +2,8 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
+ from http import HTTPStatus
6
+
5
7
  from typing import Any, Awaitable, Callable, Final, Mapping
6
8
  from tba_contracts_identity.oidc import LogoutRequestContext
7
9
  from tba_primitives_identity.standards import StandardOwner, describe_owner
@@ -19,23 +21,15 @@ from ._rp_logout_validation import (
19
21
  )
20
22
 
21
23
  try: # dependency-light import path for checkpoint evidence generation
22
- from http import HTTPStatus as status
23
24
  from tigrbl.runtime.status import HTTPException
24
25
  except Exception: # pragma: no cover - exercised in dependency-light tests
25
26
 
26
- class _FallbackStatus:
27
- HTTP_400_BAD_REQUEST = 400
28
- HTTP_401_UNAUTHORIZED = 401
29
- HTTP_404_NOT_FOUND = 404
30
-
31
27
  class HTTPException(Exception):
32
28
  def __init__(self, status_code: int, detail: Any):
33
29
  super().__init__(detail)
34
30
  self.status_code = status_code
35
31
  self.detail = detail
36
32
 
37
- status = _FallbackStatus()
38
-
39
33
  STATUS: Final[str] = "rp-initiated-logout-runtime"
40
34
 
41
35
 
@@ -50,7 +44,7 @@ async def validate_post_logout_redirect_uri(
50
44
  _require_https_if_present(post_logout_redirect_uri)
51
45
  if client_id is None:
52
46
  raise HTTPException(
53
- status.HTTP_400_BAD_REQUEST,
47
+ HTTPStatus.BAD_REQUEST,
54
48
  {
55
49
  "error": "invalid_client",
56
50
  "error_description": "client_id required when post_logout_redirect_uri is supplied",
@@ -60,7 +54,7 @@ async def validate_post_logout_redirect_uri(
60
54
  allowed = _normalized_uris(metadata.get("post_logout_redirect_uris"))
61
55
  if post_logout_redirect_uri not in allowed:
62
56
  raise HTTPException(
63
- status.HTTP_400_BAD_REQUEST,
57
+ HTTPStatus.BAD_REQUEST,
64
58
  {
65
59
  "error": "invalid_request",
66
60
  "error_description": "unregistered post_logout_redirect_uri",
@@ -81,7 +75,7 @@ async def validate_id_token_hint(
81
75
  effective_issuer = str(issuer or "").strip()
82
76
  if not effective_issuer:
83
77
  raise HTTPException(
84
- status.HTTP_400_BAD_REQUEST,
78
+ HTTPStatus.BAD_REQUEST,
85
79
  {"error": "invalid_id_token_hint", "error_description": "issuer required"},
86
80
  )
87
81
  effective_client_id = _normalize_uuid(client_id)
@@ -94,7 +88,7 @@ async def validate_id_token_hint(
94
88
  break
95
89
  if effective_client_id is None:
96
90
  raise HTTPException(
97
- status.HTTP_400_BAD_REQUEST,
91
+ HTTPStatus.BAD_REQUEST,
98
92
  {
99
93
  "error": "invalid_id_token_hint",
100
94
  "error_description": "unable to derive client_id from id_token_hint",
@@ -110,17 +104,17 @@ async def validate_id_token_hint(
110
104
  )
111
105
  except Exception as exc:
112
106
  raise HTTPException(
113
- status.HTTP_400_BAD_REQUEST, {"error": "invalid_id_token_hint"}
107
+ HTTPStatus.BAD_REQUEST, {"error": "invalid_id_token_hint"}
114
108
  ) from exc
115
109
  if str(claims.get("iss") or "") != effective_issuer:
116
110
  raise HTTPException(
117
- status.HTTP_400_BAD_REQUEST,
111
+ HTTPStatus.BAD_REQUEST,
118
112
  {"error": "invalid_id_token_hint", "error_description": "issuer mismatch"},
119
113
  )
120
114
  audiences = _audiences(claims)
121
115
  if str(effective_client_id) not in audiences:
122
116
  raise HTTPException(
123
- status.HTTP_400_BAD_REQUEST,
117
+ HTTPStatus.BAD_REQUEST,
124
118
  {
125
119
  "error": "invalid_id_token_hint",
126
120
  "error_description": "audience mismatch",
@@ -131,7 +125,7 @@ async def validate_id_token_hint(
131
125
  sid = _normalize_uuid(claims.get("sid"))
132
126
  if sid is not None and sid != expected_session_id:
133
127
  raise HTTPException(
134
- status.HTTP_400_BAD_REQUEST,
128
+ HTTPStatus.BAD_REQUEST,
135
129
  {"error": "invalid_id_token_hint", "error_description": "sid mismatch"},
136
130
  )
137
131
  return claims
@@ -160,7 +154,7 @@ def resolve_logout_client_id(
160
154
  and requested != session_client
161
155
  ):
162
156
  raise HTTPException(
163
- status.HTTP_400_BAD_REQUEST,
157
+ HTTPStatus.BAD_REQUEST,
164
158
  {
165
159
  "error": "invalid_client",
166
160
  "error_description": "requested client does not own the session",
@@ -168,7 +162,7 @@ def resolve_logout_client_id(
168
162
  )
169
163
  if requested is not None and hint_candidates and requested not in hint_candidates:
170
164
  raise HTTPException(
171
- status.HTTP_400_BAD_REQUEST,
165
+ HTTPStatus.BAD_REQUEST,
172
166
  {
173
167
  "error": "invalid_client",
174
168
  "error_description": "requested client does not match id_token_hint",
@@ -180,7 +174,7 @@ def resolve_logout_client_id(
180
174
  and session_client not in hint_candidates
181
175
  ):
182
176
  raise HTTPException(
183
- status.HTTP_400_BAD_REQUEST,
177
+ HTTPStatus.BAD_REQUEST,
184
178
  {
185
179
  "error": "invalid_client",
186
180
  "error_description": "session client does not match id_token_hint",