Skip to content

Commit cf5b1d6

Browse files
fix: jwt type corrections and documentation updates
# bug fixes and documentation/build improvements ## Type Fixes: - iss and aud in WorkerEnv should be JwtValue - ActorClaim should have iss field ## Docs, Build, & Distribution Improvements: - pypi & npm packages are missing documentation - add architecture content to mkdocs structure Written-by: Chris Lyons
1 parent f54b710 commit cf5b1d6

14 files changed

Lines changed: 135 additions & 32 deletions

File tree

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"packages/flarelette-jwt-ts": "1.8.1",
3-
"packages/flarelette-jwt-py": "1.8.2"
3+
"packages/flarelette-jwt-py": "1.8.1"
44
}

THIRD_PARTY_LICENSES.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ The TypeScript package depends on the following NPM packages:
1414
### TypeScript Package Dependencies Summary
1515

1616
```
17-
@flarelette/jwt-kit-env@1.8.0
17+
@flarelette/jwt-kit-env@1.8.1
1818
│ C:\Users\chris\git\flarelette-jwt-kit
1919
20-
└─┬ @chrislyons-dev/flarelette-jwt@1.8.0 -> .\packages\flarelette-jwt-ts
20+
└─┬ @chrislyons-dev/flarelette-jwt@1.8.1 -> .\packages\flarelette-jwt-ts
2121
│ Environment-driven JWT authentication for Cloudflare Workers with secret-name indirection
2222
└── jose@5.10.0
2323
JWA, JWS, JWE, JWT, JWK, JWKS for Node.js, Browser, Cloudflare Workers, Deno, Bun, and other Web-interoperable runtimes
@@ -77,4 +77,4 @@ This script:
7777

7878
---
7979

80-
**Last generated**: 2025-10-31
80+
**Last generated**: 2025-11-01

docs/architecture/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# 🏗️ flarelette-jwt-kit
22

33
**Architecture Documentation**
4-
Generated 2025-10-31 12:57:04
4+
Generated 2025-11-01 16:48:43
55

66
## Overview
77

docs/architecture/flarelette-jwt-kit-ir.json

Lines changed: 64 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -736,7 +736,7 @@
736736
"type": "class",
737737
"documentation": {
738738
"summary": "Actor claim for service delegation (RFC 8693).",
739-
"details": "Identifies a service acting on behalf of another principal.\nCan be nested for delegation chains.\n\nStructure:\n sub: Service identifier acting on behalf of original subject\n act: Nested ActorClaim with same structure (recursive delegation chain)"
739+
"details": "Identifies a service acting on behalf of another principal.\nCan be nested for delegation chains.\n\nStructure:\n sub: Service identifier acting on behalf of original subject\n iss: The issuer of the actor token.\n act: Nested ActorClaim with same structure (recursive delegation chain)"
740740
},
741741
"filePath": "C:\\Users\\chris\\git\\flarelette-jwt-kit\\packages\\flarelette-jwt-py\\flarelette_jwt\\env.py",
742742
"lineNumber": 49,
@@ -764,7 +764,7 @@
764764
"details": "Includes standard JWT claims, OIDC claims, and common custom claims.\nNote: At runtime, can contain any string key with JwtValue-compatible values,\nbut only defined fields get type checking."
765765
},
766766
"filePath": "C:\\Users\\chris\\git\\flarelette-jwt-kit\\packages\\flarelette-jwt-py\\flarelette_jwt\\env.py",
767-
"lineNumber": 66,
767+
"lineNumber": 68,
768768
"metadata": {
769769
"language": "python",
770770
"baseClasses": [
@@ -789,7 +789,7 @@
789789
"details": "Represents the complete configuration profile for JWT operations.\nEnvironment-driven: populated from JWT_* environment variables via profile() function.\nValidates against the JSON Schema at project root for consistency across languages."
790790
},
791791
"filePath": "C:\\Users\\chris\\git\\flarelette-jwt-kit\\packages\\flarelette-jwt-py\\flarelette_jwt\\env.py",
792-
"lineNumber": 108,
792+
"lineNumber": 110,
793793
"metadata": {
794794
"language": "python",
795795
"baseClasses": [
@@ -814,7 +814,7 @@
814814
"details": "Subset of JwtProfile containing the fields shared across all operations\n(signing, verification, policy checks). Extracted by common() function\nand merged with algorithm-specific configuration in profile()."
815815
},
816816
"filePath": "C:\\Users\\chris\\git\\flarelette-jwt-kit\\packages\\flarelette-jwt-py\\flarelette_jwt\\env.py",
817-
"lineNumber": 123,
817+
"lineNumber": 125,
818818
"metadata": {
819819
"language": "python",
820820
"baseClasses": [
@@ -850,7 +850,7 @@
850850
],
851851
"isAsync": false,
852852
"filePath": "C:\\Users\\chris\\git\\flarelette-jwt-kit\\packages\\flarelette-jwt-py\\flarelette_jwt\\env.py",
853-
"lineNumber": 137,
853+
"lineNumber": 139,
854854
"metadata": {
855855
"language": "python",
856856
"decorators": [],
@@ -876,7 +876,7 @@
876876
"parameters": [],
877877
"isAsync": false,
878878
"filePath": "C:\\Users\\chris\\git\\flarelette-jwt-kit\\packages\\flarelette-jwt-py\\flarelette_jwt\\env.py",
879-
"lineNumber": 167,
879+
"lineNumber": 169,
880880
"metadata": {
881881
"language": "python",
882882
"decorators": [],
@@ -909,7 +909,7 @@
909909
],
910910
"isAsync": false,
911911
"filePath": "C:\\Users\\chris\\git\\flarelette-jwt-kit\\packages\\flarelette-jwt-py\\flarelette_jwt\\env.py",
912-
"lineNumber": 181,
912+
"lineNumber": 183,
913913
"metadata": {
914914
"language": "python",
915915
"decorators": [],
@@ -941,7 +941,7 @@
941941
],
942942
"isAsync": false,
943943
"filePath": "C:\\Users\\chris\\git\\flarelette-jwt-kit\\packages\\flarelette-jwt-py\\flarelette_jwt\\env.py",
944-
"lineNumber": 204,
944+
"lineNumber": 206,
945945
"metadata": {
946946
"language": "python",
947947
"decorators": [],
@@ -962,7 +962,7 @@
962962
"parameters": [],
963963
"isAsync": false,
964964
"filePath": "C:\\Users\\chris\\git\\flarelette-jwt-kit\\packages\\flarelette-jwt-py\\flarelette_jwt\\env.py",
965-
"lineNumber": 211,
965+
"lineNumber": 213,
966966
"metadata": {
967967
"language": "python",
968968
"decorators": [],
@@ -983,7 +983,7 @@
983983
"parameters": [],
984984
"isAsync": false,
985985
"filePath": "C:\\Users\\chris\\git\\flarelette-jwt-kit\\packages\\flarelette-jwt-py\\flarelette_jwt\\env.py",
986-
"lineNumber": 226,
986+
"lineNumber": 228,
987987
"metadata": {
988988
"language": "python",
989989
"decorators": [],
@@ -1998,6 +1998,24 @@
19981998
"deployments": [],
19991999
"containerRelationships": [],
20002000
"componentRelationships": [
2001+
{
2002+
"description": "copyFileSync | existsSync",
2003+
"source": "flarelette_jwt_ts",
2004+
"destination": "fs",
2005+
"stereotype": "import"
2006+
},
2007+
{
2008+
"description": "dirname | join | resolve",
2009+
"source": "flarelette_jwt_ts",
2010+
"destination": "path",
2011+
"stereotype": "import"
2012+
},
2013+
{
2014+
"description": "imports fileURLToPath",
2015+
"source": "flarelette_jwt_ts",
2016+
"destination": "url",
2017+
"stereotype": "import"
2018+
},
20012019
{
20022020
"description": "imports generateSecret",
20032021
"source": "chrislyons_dev_flarelette_jwt__core",
@@ -2138,6 +2156,42 @@
21382156
}
21392157
],
21402158
"codeRelationships": [
2159+
{
2160+
"description": "imports copyFileSync",
2161+
"source": "C:/Users/chris/git/flarelette-jwt-kit/packages/flarelette-jwt-ts/prepare.js",
2162+
"destination": "fs:copyFileSync",
2163+
"stereotype": "import"
2164+
},
2165+
{
2166+
"description": "imports existsSync",
2167+
"source": "C:/Users/chris/git/flarelette-jwt-kit/packages/flarelette-jwt-ts/prepare.js",
2168+
"destination": "fs:existsSync",
2169+
"stereotype": "import"
2170+
},
2171+
{
2172+
"description": "imports dirname",
2173+
"source": "C:/Users/chris/git/flarelette-jwt-kit/packages/flarelette-jwt-ts/prepare.js",
2174+
"destination": "path:dirname",
2175+
"stereotype": "import"
2176+
},
2177+
{
2178+
"description": "imports join",
2179+
"source": "C:/Users/chris/git/flarelette-jwt-kit/packages/flarelette-jwt-ts/prepare.js",
2180+
"destination": "path:join",
2181+
"stereotype": "import"
2182+
},
2183+
{
2184+
"description": "imports resolve",
2185+
"source": "C:/Users/chris/git/flarelette-jwt-kit/packages/flarelette-jwt-ts/prepare.js",
2186+
"destination": "path:resolve",
2187+
"stereotype": "import"
2188+
},
2189+
{
2190+
"description": "imports fileURLToPath",
2191+
"source": "C:/Users/chris/git/flarelette-jwt-kit/packages/flarelette-jwt-ts/prepare.js",
2192+
"destination": "url:fileURLToPath",
2193+
"stereotype": "import"
2194+
},
21412195
{
21422196
"description": "imports generateSecret",
21432197
"source": "C:/Users/chris/git/flarelette-jwt-kit/packages/flarelette-jwt-ts/src/cli.ts",

docs/architecture/flarelette_jwt__util.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ JWT token payload/claims structure.
109109
</tr>
110110
<tr>
111111
<td><strong>Location</strong></td>
112-
<td><code>C:\Users\chris\git\flarelette-jwt-kit\packages\flarelette-jwt-py\flarelette_jwt\env.py:66</code></td>
112+
<td><code>C:\Users\chris\git\flarelette-jwt-kit\packages\flarelette-jwt-py\flarelette_jwt\env.py:68</code></td>
113113
</tr>
114114
</tbody>
115115
</table>
@@ -132,7 +132,7 @@ JWT Profile structure matching flarelette-jwt.profile.schema.json.
132132
</tr>
133133
<tr>
134134
<td><strong>Location</strong></td>
135-
<td><code>C:\Users\chris\git\flarelette-jwt-kit\packages\flarelette-jwt-py\flarelette_jwt\env.py:108</code></td>
135+
<td><code>C:\Users\chris\git\flarelette-jwt-kit\packages\flarelette-jwt-py\flarelette_jwt\env.py:110</code></td>
136136
</tr>
137137
</tbody>
138138
</table>
@@ -155,7 +155,7 @@ Common JWT configuration from environment variables.
155155
</tr>
156156
<tr>
157157
<td><strong>Location</strong></td>
158-
<td><code>C:\Users\chris\git\flarelette-jwt-kit\packages\flarelette-jwt-py\flarelette_jwt\env.py:123</code></td>
158+
<td><code>C:\Users\chris\git\flarelette-jwt-kit\packages\flarelette-jwt-py\flarelette_jwt\env.py:125</code></td>
159159
</tr>
160160
</tbody>
161161
</table>
@@ -276,7 +276,7 @@ Detect JWT algorithm mode from environment variables based on role.
276276
</tr>
277277
<tr>
278278
<td><strong>Location</strong></td>
279-
<td><code>C:\Users\chris\git\flarelette-jwt-kit\packages\flarelette-jwt-py\flarelette_jwt\env.py:137</code></td>
279+
<td><code>C:\Users\chris\git\flarelette-jwt-kit\packages\flarelette-jwt-py\flarelette_jwt\env.py:139</code></td>
280280
</tr>
281281
</tbody>
282282
</table>
@@ -306,7 +306,7 @@ Get common JWT configuration from environment.
306306
</tr>
307307
<tr>
308308
<td><strong>Location</strong></td>
309-
<td><code>C:\Users\chris\git\flarelette-jwt-kit\packages\flarelette-jwt-py\flarelette_jwt\env.py:167</code></td>
309+
<td><code>C:\Users\chris\git\flarelette-jwt-kit\packages\flarelette-jwt-py\flarelette_jwt\env.py:169</code></td>
310310
</tr>
311311
</tbody>
312312
</table>
@@ -334,7 +334,7 @@ Get JWT profile from environment.
334334
</tr>
335335
<tr>
336336
<td><strong>Location</strong></td>
337-
<td><code>C:\Users\chris\git\flarelette-jwt-kit\packages\flarelette-jwt-py\flarelette_jwt\env.py:181</code></td>
337+
<td><code>C:\Users\chris\git\flarelette-jwt-kit\packages\flarelette-jwt-py\flarelette_jwt\env.py:183</code></td>
338338
</tr>
339339
</tbody>
340340
</table>
@@ -363,7 +363,7 @@ Get JWT profile from environment.
363363
</tr>
364364
<tr>
365365
<td><strong>Location</strong></td>
366-
<td><code>C:\Users\chris\git\flarelette-jwt-kit\packages\flarelette-jwt-py\flarelette_jwt\env.py:204</code></td>
366+
<td><code>C:\Users\chris\git\flarelette-jwt-kit\packages\flarelette-jwt-py\flarelette_jwt\env.py:206</code></td>
367367
</tr>
368368
</tbody>
369369
</table>
@@ -392,7 +392,7 @@ Get JWT profile from environment.
392392
</tr>
393393
<tr>
394394
<td><strong>Location</strong></td>
395-
<td><code>C:\Users\chris\git\flarelette-jwt-kit\packages\flarelette-jwt-py\flarelette_jwt\env.py:211</code></td>
395+
<td><code>C:\Users\chris\git\flarelette-jwt-kit\packages\flarelette-jwt-py\flarelette_jwt\env.py:213</code></td>
396396
</tr>
397397
</tbody>
398398
</table>
@@ -419,7 +419,7 @@ Get JWT profile from environment.
419419
</tr>
420420
<tr>
421421
<td><strong>Location</strong></td>
422-
<td><code>C:\Users\chris\git\flarelette-jwt-kit\packages\flarelette-jwt-py\flarelette_jwt\env.py:226</code></td>
422+
<td><code>C:\Users\chris\git\flarelette-jwt-kit\packages\flarelette-jwt-py\flarelette_jwt\env.py:228</code></td>
423423
</tr>
424424
</tbody>
425425
</table>

mkdocs.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,3 +115,7 @@ nav:
115115
- Cloudflare Workers: cloudflare-workers.md
116116
- Security:
117117
- Security Guide: security-guide.md
118+
- Architecture:
119+
- Overview: architecture/README.md
120+
- TypeScript Package: architecture/chrislyons_dev_flarelette_jwt.md
121+
- Python Package: architecture/flarelette_jwt.md

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
{
22
"name": "@flarelette/jwt-kit-env",
3-
"version": "1.8.0",
3+
"version": "1.8.1",
44
"type": "module",
55
"private": true,
66
"scripts": {
7+
"archlette": "npx archlette all -f docs\\archlette.config.yaml",
78
"build": "npm run build --workspaces",
89
"test": "npm run test:js && npm run test:py",
910
"test:js": "vitest run",

packages/flarelette-jwt-py/flarelette_jwt/env.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,12 @@ class ActorClaim(TypedDict, total=False):
5454
5555
Structure:
5656
sub: Service identifier acting on behalf of original subject
57+
iss: The issuer of the actor token.
5758
act: Nested ActorClaim with same structure (recursive delegation chain)
5859
"""
5960

6061
sub: str
62+
iss: str
6163
act: dict[
6264
str, JwtValue
6365
] # Nested ActorClaim (recursive, breaks TypedDict limitation)

packages/flarelette-jwt-py/pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "flarelette-jwt"
7-
version = "1.8.2"
7+
version = "1.8.1"
88
description = "Environment-driven JWT authentication for Cloudflare Workers Python with secret-name indirection"
9-
readme = "docs/README.md"
9+
readme = "README.md"
1010
requires-python = ">=3.11"
1111
license = { text = "MIT" }
1212
authors = [{ name = "Chris Lyons", email = "chris@chrislyons.dev" }]
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Build output
2+
dist/
3+
4+
# Copied documentation files (generated by prepare.js)
5+
README.md
6+
CONTRIBUTING.md
7+
THIRD_PARTY_LICENSES.md
8+
LICENSE

0 commit comments

Comments
 (0)