tigrbl-auth 0.4.0.dev1__tar.gz → 0.4.0.dev2__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tigrbl-auth
3
- Version: 0.4.0.dev1
3
+ Version: 0.4.0.dev2
4
4
  Summary: Compatibility facade for the Tigrbl identity package suite.
5
5
  License-Expression: Apache-2.0
6
6
  Requires-Python: >=3.10,<3.15
@@ -1,14 +1,14 @@
1
1
  [project]
2
- name = "tigrbl-auth"
3
- version = "0.4.0.dev1"
4
- description = "Compatibility facade for the Tigrbl identity package suite."
5
- readme = "README.md"
6
- requires-python = ">=3.10,<3.15"
7
- license = "Apache-2.0"
8
-
9
- [build-system]
10
- requires = ["poetry-core>=1.0.0"]
11
- build-backend = "poetry.core.masonry.api"
12
-
13
- [tool.poetry]
14
- packages = [{ include = "tigrbl_auth", from = "src" }]
2
+ name = "tigrbl-auth"
3
+ version = "0.4.0.dev2"
4
+ description = "Compatibility facade for the Tigrbl identity package suite."
5
+ readme = "README.md"
6
+ requires-python = ">=3.10,<3.15"
7
+ license = "Apache-2.0"
8
+
9
+ [build-system]
10
+ requires = ["poetry-core>=1.0.0"]
11
+ build-backend = "poetry.core.masonry.api"
12
+
13
+ [tool.poetry]
14
+ packages = [{ include = "tigrbl_auth", from = "src" }]
@@ -1,109 +1,109 @@
1
- """tigrbl_auth
2
-
3
- Tigrbl-native authentication and authorization package checkpoint.
4
-
5
- This package keeps top-level imports lightweight for governance and report
6
- workflows while still exposing the dependency-light RFC helper surface expected
7
- by the repository tests and previous checkpoints.
8
- """
9
-
10
- from __future__ import annotations
11
-
12
- import sys
13
- from http import HTTPStatus as _HTTPStatus
14
- from importlib import import_module
15
- from typing import Any
16
-
17
-
18
- def _install_tomllib_alias() -> None:
19
- """Backfill ``tomllib`` on Python 3.10 using ``tomli`` if available."""
20
-
21
- if sys.version_info >= (3, 11):
22
- return
23
- try: # pragma: no cover - exercised on Python 3.10 CI lanes
24
- import tomllib as _tomllib # noqa: F401
25
- except ModuleNotFoundError:
26
- try:
27
- import tomli as _tomllib # type: ignore[no-redef]
28
- except ModuleNotFoundError:
29
- return
30
- sys.modules.setdefault("tomllib", _tomllib)
31
-
32
-
33
- def _install_http_status_aliases() -> None:
34
- """Provide Starlette-style ``HTTP_<code>_<NAME>`` aliases on ``HTTPStatus``.
35
-
36
- The repository tests and some release-path modules historically rely on the
37
- constant-style names exported by Starlette/FastAPI. Tigrbl uses the stdlib
38
- ``http.HTTPStatus`` enum, so install integer aliases once at package import
39
- time to keep both surfaces compatible.
40
- """
41
-
42
- for item in _HTTPStatus:
43
- alias = f"HTTP_{int(item)}_{item.name}"
44
- if not hasattr(_HTTPStatus, alias):
45
- setattr(_HTTPStatus, alias, int(item))
46
-
1
+ """tigrbl_auth
2
+
3
+ Tigrbl-native authentication and authorization package checkpoint.
4
+
5
+ This package keeps top-level imports lightweight for governance and report
6
+ workflows while still exposing the dependency-light RFC helper surface expected
7
+ by the repository tests and previous checkpoints.
8
+ """
9
+
10
+ from __future__ import annotations
11
+
12
+ import sys
13
+ from http import HTTPStatus as _HTTPStatus
14
+ from importlib import import_module
15
+ from typing import Any
16
+
17
+
18
+ def _install_tomllib_alias() -> None:
19
+ """Backfill ``tomllib`` on Python 3.10 using ``tomli`` if available."""
20
+
21
+ if sys.version_info >= (3, 11):
22
+ return
23
+ try: # pragma: no cover - exercised on Python 3.10 CI lanes
24
+ import tomllib as _tomllib # noqa: F401
25
+ except ModuleNotFoundError:
26
+ try:
27
+ import tomli as _tomllib # type: ignore[no-redef]
28
+ except ModuleNotFoundError:
29
+ return
30
+ sys.modules.setdefault("tomllib", _tomllib)
31
+
32
+
33
+ def _install_http_status_aliases() -> None:
34
+ """Provide Starlette-style ``HTTP_<code>_<NAME>`` aliases on ``HTTPStatus``.
35
+
36
+ The repository tests and some release-path modules historically rely on the
37
+ constant-style names exported by Starlette/FastAPI. Tigrbl uses the stdlib
38
+ ``http.HTTPStatus`` enum, so install integer aliases once at package import
39
+ time to keep both surfaces compatible.
40
+ """
41
+
42
+ for item in _HTTPStatus:
43
+ alias = f"HTTP_{int(item)}_{item.name}"
44
+ if not hasattr(_HTTPStatus, alias):
45
+ setattr(_HTTPStatus, alias, int(item))
46
+
47
47
  _install_tomllib_alias()
48
48
  _install_http_status_aliases()
49
-
50
- _MODULE_EXPORTS = {
51
- "framework": "tigrbl_auth.framework",
52
- "runtime_cfg": "tigrbl_auth.runtime_cfg",
53
- "rfc7591": "tigrbl_auth.rfc.rfc7591",
54
- "rfc7592": "tigrbl_auth.rfc.rfc7592",
55
- "rfc7662": "tigrbl_auth.rfc.rfc7662",
56
- "rfc9101": "tigrbl_auth.rfc.rfc9101",
57
- }
58
-
59
- _SYMBOL_EXPORTS = {
60
- "encode_jwt": ("tigrbl_auth.standards.jose.rfc7519", "encode_jwt"),
61
- "decode_jwt": ("tigrbl_auth.standards.jose.rfc7519", "decode_jwt"),
62
- "encrypt_jwe": ("tigrbl_auth.standards.jose.rfc7516", "encrypt_jwe"),
63
- "decrypt_jwe": ("tigrbl_auth.standards.jose.rfc7516", "decrypt_jwe"),
64
- "sign_jws": ("tigrbl_auth.standards.jose.rfc7515", "sign_jws"),
65
- "verify_jws": ("tigrbl_auth.standards.jose.rfc7515", "verify_jws"),
66
- "load_signing_jwk": ("tigrbl_auth.standards.jose.rfc7517", "load_signing_jwk"),
67
- "load_public_jwk": ("tigrbl_auth.standards.jose.rfc7517", "load_public_jwk"),
68
- "supported_algorithms": ("tigrbl_auth.standards.jose.rfc7518", "supported_algorithms"),
69
- "RFC7520_SPEC_URL": ("tigrbl_auth.rfc.rfc7520", "RFC7520_SPEC_URL"),
70
- "jws_then_jwe": ("tigrbl_auth.rfc.rfc7520", "jws_then_jwe"),
71
- "jwe_then_jws": ("tigrbl_auth.rfc.rfc7520", "jwe_then_jws"),
72
- "makeCodeVerifier": ("tigrbl_auth.rfc.rfc7636_pkce", "makeCodeVerifier"),
73
- "makeCodeChallenge": ("tigrbl_auth.rfc.rfc7636_pkce", "makeCodeChallenge"),
74
- "verify_code_challenge": ("tigrbl_auth.rfc.rfc7636_pkce", "verify_code_challenge"),
75
- "RFC8628_SPEC_URL": ("tigrbl_auth.rfc.rfc8628", "RFC8628_SPEC_URL"),
76
- "generate_user_code": ("tigrbl_auth.rfc.rfc8628", "generate_user_code"),
77
- "validate_user_code": ("tigrbl_auth.rfc.rfc8628", "validate_user_code"),
78
- "generate_device_code": ("tigrbl_auth.rfc.rfc8628", "generate_device_code"),
79
- "RFC9207_SPEC_URL": ("tigrbl_auth.rfc.rfc9207", "RFC9207_SPEC_URL"),
80
- "extract_issuer": ("tigrbl_auth.rfc.rfc9207", "extract_issuer"),
81
- "AuthorizationDetail": ("tigrbl_auth.rfc.rfc9396", "AuthorizationDetail"),
82
- "RFC9396_SPEC_URL": ("tigrbl_auth.rfc.rfc9396", "RFC9396_SPEC_URL"),
83
- "parse_authorization_details": ("tigrbl_auth.rfc.rfc9396", "parse_authorization_details"),
84
- "RFC8932_SPEC_URL": ("tigrbl_auth.rfc.rfc8932", "RFC8932_SPEC_URL"),
85
- "enforce_encrypted_dns": ("tigrbl_auth.rfc.rfc8932", "enforce_encrypted_dns"),
86
- }
87
-
88
-
89
- def __getattr__(name: str) -> Any:
90
- module_name = _MODULE_EXPORTS.get(name)
91
- if module_name is not None:
92
- module = import_module(module_name)
93
- globals()[name] = module
94
- return module
95
- symbol = _SYMBOL_EXPORTS.get(name)
96
- if symbol is not None:
97
- module_name, attr_name = symbol
98
- module = import_module(module_name)
99
- value = getattr(module, attr_name)
100
- globals()[name] = value
101
- return value
102
- raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
103
-
104
-
105
- def __dir__() -> list[str]:
106
- return sorted(set(globals()) | set(_MODULE_EXPORTS) | set(_SYMBOL_EXPORTS))
107
-
108
-
109
- __all__ = sorted(set(_MODULE_EXPORTS) | set(_SYMBOL_EXPORTS))
49
+
50
+ _MODULE_EXPORTS = {
51
+ "framework": "tigrbl_auth.framework",
52
+ "runtime_cfg": "tigrbl_auth.runtime_cfg",
53
+ "rfc7591": "tigrbl_auth.rfc.rfc7591",
54
+ "rfc7592": "tigrbl_auth.rfc.rfc7592",
55
+ "rfc7662": "tigrbl_auth.rfc.rfc7662",
56
+ "rfc9101": "tigrbl_auth.rfc.rfc9101",
57
+ }
58
+
59
+ _SYMBOL_EXPORTS = {
60
+ "encode_jwt": ("tigrbl_auth.standards.jose.rfc7519", "encode_jwt"),
61
+ "decode_jwt": ("tigrbl_auth.standards.jose.rfc7519", "decode_jwt"),
62
+ "encrypt_jwe": ("tigrbl_auth.standards.jose.rfc7516", "encrypt_jwe"),
63
+ "decrypt_jwe": ("tigrbl_auth.standards.jose.rfc7516", "decrypt_jwe"),
64
+ "sign_jws": ("tigrbl_auth.standards.jose.rfc7515", "sign_jws"),
65
+ "verify_jws": ("tigrbl_auth.standards.jose.rfc7515", "verify_jws"),
66
+ "load_signing_jwk": ("tigrbl_auth.standards.jose.rfc7517", "load_signing_jwk"),
67
+ "load_public_jwk": ("tigrbl_auth.standards.jose.rfc7517", "load_public_jwk"),
68
+ "supported_algorithms": ("tigrbl_auth.standards.jose.rfc7518", "supported_algorithms"),
69
+ "RFC7520_SPEC_URL": ("tigrbl_auth.rfc.rfc7520", "RFC7520_SPEC_URL"),
70
+ "jws_then_jwe": ("tigrbl_auth.rfc.rfc7520", "jws_then_jwe"),
71
+ "jwe_then_jws": ("tigrbl_auth.rfc.rfc7520", "jwe_then_jws"),
72
+ "makeCodeVerifier": ("tigrbl_auth.rfc.rfc7636_pkce", "makeCodeVerifier"),
73
+ "makeCodeChallenge": ("tigrbl_auth.rfc.rfc7636_pkce", "makeCodeChallenge"),
74
+ "verify_code_challenge": ("tigrbl_auth.rfc.rfc7636_pkce", "verify_code_challenge"),
75
+ "RFC8628_SPEC_URL": ("tigrbl_auth.rfc.rfc8628", "RFC8628_SPEC_URL"),
76
+ "generate_user_code": ("tigrbl_auth.rfc.rfc8628", "generate_user_code"),
77
+ "validate_user_code": ("tigrbl_auth.rfc.rfc8628", "validate_user_code"),
78
+ "generate_device_code": ("tigrbl_auth.rfc.rfc8628", "generate_device_code"),
79
+ "RFC9207_SPEC_URL": ("tigrbl_auth.rfc.rfc9207", "RFC9207_SPEC_URL"),
80
+ "extract_issuer": ("tigrbl_auth.rfc.rfc9207", "extract_issuer"),
81
+ "AuthorizationDetail": ("tigrbl_auth.rfc.rfc9396", "AuthorizationDetail"),
82
+ "RFC9396_SPEC_URL": ("tigrbl_auth.rfc.rfc9396", "RFC9396_SPEC_URL"),
83
+ "parse_authorization_details": ("tigrbl_auth.rfc.rfc9396", "parse_authorization_details"),
84
+ "RFC8932_SPEC_URL": ("tigrbl_auth.rfc.rfc8932", "RFC8932_SPEC_URL"),
85
+ "enforce_encrypted_dns": ("tigrbl_auth.rfc.rfc8932", "enforce_encrypted_dns"),
86
+ }
87
+
88
+
89
+ def __getattr__(name: str) -> Any:
90
+ module_name = _MODULE_EXPORTS.get(name)
91
+ if module_name is not None:
92
+ module = import_module(module_name)
93
+ globals()[name] = module
94
+ return module
95
+ symbol = _SYMBOL_EXPORTS.get(name)
96
+ if symbol is not None:
97
+ module_name, attr_name = symbol
98
+ module = import_module(module_name)
99
+ value = getattr(module, attr_name)
100
+ globals()[name] = value
101
+ return value
102
+ raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
103
+
104
+
105
+ def __dir__() -> list[str]:
106
+ return sorted(set(globals()) | set(_MODULE_EXPORTS) | set(_SYMBOL_EXPORTS))
107
+
108
+
109
+ __all__ = sorted(set(_MODULE_EXPORTS) | set(_SYMBOL_EXPORTS))