devlab-auth 0.2.0__tar.gz → 0.3.1__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.
- devlab_auth-0.3.1/CHANGELOG.md +23 -0
- {devlab_auth-0.2.0 → devlab_auth-0.3.1}/PKG-INFO +6 -1
- {devlab_auth-0.2.0 → devlab_auth-0.3.1}/README.md +5 -0
- {devlab_auth-0.2.0 → devlab_auth-0.3.1}/package.json +1 -1
- {devlab_auth-0.2.0 → devlab_auth-0.3.1}/pyproject.toml +9 -1
- {devlab_auth-0.2.0 → devlab_auth-0.3.1}/src/devlab_auth/__init__.py +3 -0
- devlab_auth-0.3.1/src/devlab_auth/constants.py +4 -0
- {devlab_auth-0.2.0 → devlab_auth-0.3.1}/src/devlab_auth/jwks.py +2 -1
- {devlab_auth-0.2.0 → devlab_auth-0.3.1}/uv.lock +4 -4
- devlab_auth-0.2.0/CHANGELOG.md +0 -7
- {devlab_auth-0.2.0 → devlab_auth-0.3.1}/.env.example +0 -0
- {devlab_auth-0.2.0 → devlab_auth-0.3.1}/.gitignore +0 -0
- {devlab_auth-0.2.0 → devlab_auth-0.3.1}/src/devlab_auth/client.py +0 -0
- {devlab_auth-0.2.0 → devlab_auth-0.3.1}/src/devlab_auth/fastapi.py +0 -0
- {devlab_auth-0.2.0 → devlab_auth-0.3.1}/src/devlab_auth/m2m.py +0 -0
- {devlab_auth-0.2.0 → devlab_auth-0.3.1}/src/devlab_auth/middleware.py +0 -0
- {devlab_auth-0.2.0 → devlab_auth-0.3.1}/src/devlab_auth/models.py +0 -0
- {devlab_auth-0.2.0 → devlab_auth-0.3.1}/src/devlab_auth/py.typed +0 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# @yuva-devlab/auth-py
|
|
2
|
+
|
|
3
|
+
## 0.3.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 91fa4de: Bump `opentelemetry-api` to 1.45.2 in `@yuva-devlab/auth-py`
|
|
8
|
+
|
|
9
|
+
## 0.3.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- f5100bc: feat(packages): centralize jwks discovery path and fix cli iterator
|
|
14
|
+
|
|
15
|
+
- Define `DEFAULT_JWKS_PATH` and `DEFAULT_OPENID_CONFIG_PATH` across auth-server, auth-client, auth-py, and cli
|
|
16
|
+
- Replace ad-hoc string literals with canonical constants for ecosystem-wide route configuration
|
|
17
|
+
- Fix TS2802 iterator error in CLI token inspection command and configure es2022 compiler target
|
|
18
|
+
|
|
19
|
+
## 0.2.0
|
|
20
|
+
|
|
21
|
+
### Minor Changes
|
|
22
|
+
|
|
23
|
+
- 4896b97: Add universal Python authentication SDK (`devlab-auth`) with RS256 JWKS validation, M2M API key caching, and FastAPI route guards.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: devlab-auth
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.1
|
|
4
4
|
Summary: Universal DevLab Authentication SDK for Python (RS256 JWKS & M2M API Keys with FastAPI guards)
|
|
5
5
|
Author-email: Yuvaraj Pattabi <yuva.devlab@gmail.com>
|
|
6
6
|
Requires-Python: >=3.11
|
|
@@ -76,3 +76,8 @@ uv run ruff format --check .
|
|
|
76
76
|
# Strict typechecking (zero any, strict mode)
|
|
77
77
|
uv run mypy src
|
|
78
78
|
```
|
|
79
|
+
|
|
80
|
+
## Author & Attribution
|
|
81
|
+
|
|
82
|
+
- **Author**: Yuva DevLab (`yuva.devlab@gmail.com`)
|
|
83
|
+
- **License**: MIT
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "devlab-auth"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.3.1"
|
|
4
4
|
description = "Universal DevLab Authentication SDK for Python (RS256 JWKS & M2M API Keys with FastAPI guards)"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.11"
|
|
@@ -61,6 +61,7 @@ warn_unused_ignores = true
|
|
|
61
61
|
warn_return_any = true
|
|
62
62
|
show_error_codes = true
|
|
63
63
|
pretty = true
|
|
64
|
+
enable_error_code = ["deprecated"]
|
|
64
65
|
|
|
65
66
|
[[tool.mypy.overrides]]
|
|
66
67
|
module = "cachetools.*"
|
|
@@ -70,3 +71,10 @@ ignore_missing_imports = true
|
|
|
70
71
|
module = "jwt.*"
|
|
71
72
|
ignore_missing_imports = true
|
|
72
73
|
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
[tool.pytest.ini_options]
|
|
77
|
+
filterwarnings = [
|
|
78
|
+
"error::DeprecationWarning",
|
|
79
|
+
"default::DeprecationWarning",
|
|
80
|
+
]
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
"""DevLab Authentication SDK for Python (FastAPI, LangChain, Agents)."""
|
|
2
2
|
|
|
3
3
|
from devlab_auth.client import DevLabAuth
|
|
4
|
+
from devlab_auth.constants import DEFAULT_JWKS_PATH, DEFAULT_OPENID_CONFIG_PATH
|
|
4
5
|
from devlab_auth.jwks import JwksValidator
|
|
5
6
|
from devlab_auth.m2m import M2mApiKeyValidator
|
|
6
7
|
from devlab_auth.models import AuthPrincipal, M2mValidationResult
|
|
7
8
|
|
|
8
9
|
__all__ = [
|
|
10
|
+
"DEFAULT_JWKS_PATH",
|
|
11
|
+
"DEFAULT_OPENID_CONFIG_PATH",
|
|
9
12
|
"AuthPrincipal",
|
|
10
13
|
"DevLabAuth",
|
|
11
14
|
"JwksValidator",
|
|
@@ -6,6 +6,7 @@ from typing import Any
|
|
|
6
6
|
import jwt
|
|
7
7
|
from jwt import PyJWKClient
|
|
8
8
|
|
|
9
|
+
from devlab_auth.constants import DEFAULT_JWKS_PATH
|
|
9
10
|
from devlab_auth.models import AuthPrincipal
|
|
10
11
|
|
|
11
12
|
|
|
@@ -19,7 +20,7 @@ class JwksValidator:
|
|
|
19
20
|
cache_ttl_seconds: int = 3600,
|
|
20
21
|
):
|
|
21
22
|
base_url = portal_url or os.getenv("DEVLAB_PORTAL_API_URL") or "http://localhost:4000"
|
|
22
|
-
self.jwks_uri = jwks_uri or f"{base_url.rstrip('/')}
|
|
23
|
+
self.jwks_uri = jwks_uri or f"{base_url.rstrip('/')}{DEFAULT_JWKS_PATH}"
|
|
23
24
|
self._client = PyJWKClient(self.jwks_uri, cache_jwk_set=True, lifespan=cache_ttl_seconds)
|
|
24
25
|
|
|
25
26
|
def validate_token(self, token: str) -> AuthPrincipal:
|
|
@@ -297,7 +297,7 @@ wheels = [
|
|
|
297
297
|
|
|
298
298
|
[[package]]
|
|
299
299
|
name = "devlab-auth"
|
|
300
|
-
version = "0.
|
|
300
|
+
version = "0.3.0"
|
|
301
301
|
source = { editable = "." }
|
|
302
302
|
dependencies = [
|
|
303
303
|
{ name = "cachetools" },
|
|
@@ -592,14 +592,14 @@ wheels = [
|
|
|
592
592
|
|
|
593
593
|
[[package]]
|
|
594
594
|
name = "opentelemetry-api"
|
|
595
|
-
version = "1.45.
|
|
595
|
+
version = "1.45.2"
|
|
596
596
|
source = { registry = "https://pypi.org/simple" }
|
|
597
597
|
dependencies = [
|
|
598
598
|
{ name = "typing-extensions" },
|
|
599
599
|
]
|
|
600
|
-
sdist = { url = "https://files.pythonhosted.org/packages/
|
|
600
|
+
sdist = { url = "https://files.pythonhosted.org/packages/19/14/cf3a6b6448849656e1e5f4e2101f3988dc6789724050096aba1bc5ccf592/opentelemetry_api-1.45.2.tar.gz", hash = "sha256:d7b0008e21e5fd61cbe7a7f34ca3b6905a78ab677d9bc395e299359c75cda6b4", size = 73277, upload-time = "2026-10-29T17:29:37.888Z" }
|
|
601
601
|
wheels = [
|
|
602
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
602
|
+
{ url = "https://files.pythonhosted.org/packages/a9/2d/610db864d7513158cebb8f36cc88e67e73bd6c7aa1905ef18d89e1281c81/opentelemetry_api-1.45.2-py3-none-any.whl", hash = "sha256:2cbd737377e710ee740d261c94e93fa0f08e6d037c18f17513cc0a2d94479a34", size = 60335, upload-time = "2026-10-29T17:29:06.955Z" },
|
|
603
603
|
]
|
|
604
604
|
|
|
605
605
|
[[package]]
|
devlab_auth-0.2.0/CHANGELOG.md
DELETED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|