devlab-auth 0.2.0__tar.gz → 0.3.0__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.
@@ -0,0 +1,17 @@
1
+ # @yuva-devlab/auth-py
2
+
3
+ ## 0.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - f5100bc: feat(packages): centralize jwks discovery path and fix cli iterator
8
+
9
+ - Define `DEFAULT_JWKS_PATH` and `DEFAULT_OPENID_CONFIG_PATH` across auth-server, auth-client, auth-py, and cli
10
+ - Replace ad-hoc string literals with canonical constants for ecosystem-wide route configuration
11
+ - Fix TS2802 iterator error in CLI token inspection command and configure es2022 compiler target
12
+
13
+ ## 0.2.0
14
+
15
+ ### Minor Changes
16
+
17
+ - 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.2.0
3
+ Version: 0.3.0
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
@@ -56,3 +56,8 @@ uv run ruff format --check .
56
56
  # Strict typechecking (zero any, strict mode)
57
57
  uv run mypy src
58
58
  ```
59
+
60
+ ## Author & Attribution
61
+
62
+ - **Author**: Yuva DevLab (`yuva.devlab@gmail.com`)
63
+ - **License**: MIT
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yuva-devlab/auth-py",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "Universal DevLab Authentication SDK for Python",
5
5
  "private": true,
6
6
  "scripts": {
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "devlab-auth"
3
- version = "0.2.0"
3
+ version = "0.3.0"
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",
@@ -0,0 +1,4 @@
1
+ """Centralized authentication constants for DevLab Python SDK."""
2
+
3
+ DEFAULT_JWKS_PATH = "/.well-known/jwks.json"
4
+ DEFAULT_OPENID_CONFIG_PATH = "/.well-known/openid-configuration"
@@ -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('/')}/.well-known/jwks.json"
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.1.0"
300
+ version = "0.2.0"
301
301
  source = { editable = "." }
302
302
  dependencies = [
303
303
  { name = "cachetools" },
@@ -1,7 +0,0 @@
1
- # @yuva-devlab/auth-py
2
-
3
- ## 0.2.0
4
-
5
- ### Minor Changes
6
-
7
- - 4896b97: Add universal Python authentication SDK (`devlab-auth`) with RS256 JWKS validation, M2M API key caching, and FastAPI route guards.
File without changes
File without changes