` - Decoded payload if valid, null otherwise || **Location** | `C:/Users/chris/git/flarelette-jwt-kit/packages/flarelette-jwt-ts/src/verify.ts:131` |
**Parameters:**
@@ -131,3 +75,4 @@ Supports multiple key resolution strategies with automatic algorithm detection
+
diff --git a/docs/architecture/diagrams/mermaid/structurizr-Classes_chrislyons_dev_flarelette_jwt__adapters.mmd b/docs/architecture/diagrams/mermaid/structurizr-Classes_chrislyons_dev_flarelette_jwt__adapters.mmd
index 5c35ac0..13cbd5d 100644
--- a/docs/architecture/diagrams/mermaid/structurizr-Classes_chrislyons_dev_flarelette_jwt__adapters.mmd
+++ b/docs/architecture/diagrams/mermaid/structurizr-Classes_chrislyons_dev_flarelette_jwt__adapters.mmd
@@ -1,18 +1,18 @@
-graph TB
+graph LR
linkStyle default fill:#ffffff
- subgraph diagram ["flarelette-jwt-kit - @chrislyons-dev/flarelette-jwt - Components"]
+ subgraph diagram [" "]
style diagram fill:#ffffff,stroke:#ffffff
- subgraph 2 ["@chrislyons-dev/flarelette-jwt"]
+ subgraph 2 [" "]
style 2 fill:#ffffff,stroke:#2e6295,color:#2e6295
- 50("adapters.bindEnv
[Component: function]
Store both environment
variables and service
bindings globally
")
- style 50 fill:#85bbf0,stroke:#5d82a8,color:#000000
- 51("adapters.getServiceBinding
[Component: function]
Get service binding by name
from global storage
")
- style 51 fill:#85bbf0,stroke:#5d82a8,color:#000000
- 52("adapters.makeKit
[Component: function]
Returns a namespaced kit
whose calls use the provided
env bag. Automatically
injects JWKS service binding
if configured.
")
- style 52 fill:#85bbf0,stroke:#5d82a8,color:#000000
+ 55("adapters.bindEnv
[Component: function]
Store both environment
variables and service
bindings globally
")
+ style 55 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 56("adapters.getServiceBinding
[Component: function]
Get service binding by name
from global storage
")
+ style 56 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 57("adapters.makeKit
[Component: function]
Returns a namespaced kit
whose calls use the provided
env bag. Automatically
injects JWKS service binding
if configured.
")
+ style 57 fill:#d4e8fc,stroke:#94a2b0,color:#000000
end
end
\ No newline at end of file
diff --git a/docs/architecture/diagrams/mermaid/structurizr-Classes_chrislyons_dev_flarelette_jwt__core.mmd b/docs/architecture/diagrams/mermaid/structurizr-Classes_chrislyons_dev_flarelette_jwt__core.mmd
index 8604b32..82a2c2e 100644
--- a/docs/architecture/diagrams/mermaid/structurizr-Classes_chrislyons_dev_flarelette_jwt__core.mmd
+++ b/docs/architecture/diagrams/mermaid/structurizr-Classes_chrislyons_dev_flarelette_jwt__core.mmd
@@ -1,34 +1,34 @@
-graph TB
+graph LR
linkStyle default fill:#ffffff
- subgraph diagram ["flarelette-jwt-kit - @chrislyons-dev/flarelette-jwt - Components"]
+ subgraph diagram [" "]
style diagram fill:#ffffff,stroke:#ffffff
- subgraph 2 ["@chrislyons-dev/flarelette-jwt"]
+ subgraph 2 [" "]
style 2 fill:#ffffff,stroke:#2e6295,color:#2e6295
11("core.envRead
[Component: function]
")
- style 11 fill:#85bbf0,stroke:#5d82a8,color:#000000
+ style 11 fill:#d4e8fc,stroke:#94a2b0,color:#000000
12("core.envMode
[Component: function]
")
- style 12 fill:#85bbf0,stroke:#5d82a8,color:#000000
+ style 12 fill:#d4e8fc,stroke:#94a2b0,color:#000000
13("core.getCommon
[Component: function]
Get common JWT configuration
from environment Returns
partial JwtProfile-compatible
configuration
")
- style 13 fill:#85bbf0,stroke:#5d82a8,color:#000000
+ style 13 fill:#d4e8fc,stroke:#94a2b0,color:#000000
14("core.getProfile
[Component: function]
Get JWT profile from
environment Returns complete
JwtProfile with detected
algorithm
")
- style 14 fill:#85bbf0,stroke:#5d82a8,color:#000000
+ style 14 fill:#d4e8fc,stroke:#94a2b0,color:#000000
15("core.getHSSecret
[Component: function]
")
- style 15 fill:#85bbf0,stroke:#5d82a8,color:#000000
+ style 15 fill:#d4e8fc,stroke:#94a2b0,color:#000000
16("core.getPrivateJwkString
[Component: function]
")
- style 16 fill:#85bbf0,stroke:#5d82a8,color:#000000
+ style 16 fill:#d4e8fc,stroke:#94a2b0,color:#000000
17("core.getPublicJwkString
[Component: function]
")
- style 17 fill:#85bbf0,stroke:#5d82a8,color:#000000
+ style 17 fill:#d4e8fc,stroke:#94a2b0,color:#000000
18("core.getJwksServiceName
[Component: function]
")
- style 18 fill:#85bbf0,stroke:#5d82a8,color:#000000
+ style 18 fill:#d4e8fc,stroke:#94a2b0,color:#000000
19("core.getJwksUrl
[Component: function]
")
- style 19 fill:#85bbf0,stroke:#5d82a8,color:#000000
+ style 19 fill:#d4e8fc,stroke:#94a2b0,color:#000000
20("core.getJwksCacheTtl
[Component: function]
")
- style 20 fill:#85bbf0,stroke:#5d82a8,color:#000000
- 44("core.sign
[Component: function]
Sign a JWT token with HS512
or EdDSA algorithm
")
- style 44 fill:#85bbf0,stroke:#5d82a8,color:#000000
+ style 20 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 48("core.sign
[Component: function]
Sign a JWT token with HS512
or EdDSA algorithm
")
+ style 48 fill:#d4e8fc,stroke:#94a2b0,color:#000000
end
end
\ No newline at end of file
diff --git a/docs/architecture/diagrams/mermaid/structurizr-Classes_chrislyons_dev_flarelette_jwt__explicit.mmd b/docs/architecture/diagrams/mermaid/structurizr-Classes_chrislyons_dev_flarelette_jwt__explicit.mmd
index ee6cd86..359858f 100644
--- a/docs/architecture/diagrams/mermaid/structurizr-Classes_chrislyons_dev_flarelette_jwt__explicit.mmd
+++ b/docs/architecture/diagrams/mermaid/structurizr-Classes_chrislyons_dev_flarelette_jwt__explicit.mmd
@@ -1,30 +1,34 @@
-graph TB
+graph LR
linkStyle default fill:#ffffff
- subgraph diagram ["flarelette-jwt-kit - @chrislyons-dev/flarelette-jwt - Components"]
+ subgraph diagram [" "]
style diagram fill:#ffffff,stroke:#ffffff
- subgraph 2 ["@chrislyons-dev/flarelette-jwt"]
+ subgraph 2 [" "]
style 2 fill:#ffffff,stroke:#2e6295,color:#2e6295
21("explicit.signWithConfig
[Component: function]
Sign a JWT token with
explicit configuration
")
- style 21 fill:#85bbf0,stroke:#5d82a8,color:#000000
+ style 21 fill:#d4e8fc,stroke:#94a2b0,color:#000000
22("explicit.verifyWithConfig
[Component: function]
Verify a JWT token with
explicit configuration
")
- style 22 fill:#85bbf0,stroke:#5d82a8,color:#000000
+ style 22 fill:#d4e8fc,stroke:#94a2b0,color:#000000
23("explicit.createTokenWithConfig
[Component: function]
Create a signed JWT token
with explicit configuration
Higher-level wrapper around
signWithConfig for
convenience.
")
- style 23 fill:#85bbf0,stroke:#5d82a8,color:#000000
+ style 23 fill:#d4e8fc,stroke:#94a2b0,color:#000000
24("explicit.createDelegatedTokenWithConfig
[Component: function]
Create a delegated JWT token
with explicit configuration
Implements RFC 8693 actor
claim pattern for
service-to-service
delegation.
")
- style 24 fill:#85bbf0,stroke:#5d82a8,color:#000000
+ style 24 fill:#d4e8fc,stroke:#94a2b0,color:#000000
25("explicit.checkAuthWithConfig
[Component: function]
Verify and authorize a JWT
token with explicit
configuration
")
- style 25 fill:#85bbf0,stroke:#5d82a8,color:#000000
+ style 25 fill:#d4e8fc,stroke:#94a2b0,color:#000000
26("explicit.createHS512Config
[Component: function]
Helper function to create
HS512 config from
base64url-encoded secret
")
- style 26 fill:#85bbf0,stroke:#5d82a8,color:#000000
+ style 26 fill:#d4e8fc,stroke:#94a2b0,color:#000000
27("explicit.createEdDSASignConfig
[Component: function]
Helper function to create
EdDSA sign config from JWK
")
- style 27 fill:#85bbf0,stroke:#5d82a8,color:#000000
+ style 27 fill:#d4e8fc,stroke:#94a2b0,color:#000000
28("explicit.createEdDSAVerifyConfig
[Component: function]
Helper function to create
EdDSA verify config from JWK
")
- style 28 fill:#85bbf0,stroke:#5d82a8,color:#000000
- 29("explicit.createJWKSUrlVerifyConfig
[Component: function]
Helper function to create
HTTP JWKS URL verification
config Enables testing
without environment variables
by providing explicit
configuration
")
- style 29 fill:#85bbf0,stroke:#5d82a8,color:#000000
+ style 28 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 29("explicit.createES512SignConfig
[Component: function]
Helper function to create
ES512 sign config from a
P-521 EC private JWK
")
+ style 29 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 30("explicit.createES512VerifyConfig
[Component: function]
Helper function to create
ES512 verify config from a
P-521 EC public JWK
")
+ style 30 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 31("explicit.createJWKSUrlVerifyConfig
[Component: function]
")
+ style 31 fill:#d4e8fc,stroke:#94a2b0,color:#000000
end
end
\ No newline at end of file
diff --git a/docs/architecture/diagrams/mermaid/structurizr-Classes_chrislyons_dev_flarelette_jwt__jwks.mmd b/docs/architecture/diagrams/mermaid/structurizr-Classes_chrislyons_dev_flarelette_jwt__jwks.mmd
index 850c013..eb8720f 100644
--- a/docs/architecture/diagrams/mermaid/structurizr-Classes_chrislyons_dev_flarelette_jwt__jwks.mmd
+++ b/docs/architecture/diagrams/mermaid/structurizr-Classes_chrislyons_dev_flarelette_jwt__jwks.mmd
@@ -1,26 +1,26 @@
-graph TB
+graph LR
linkStyle default fill:#ffffff
- subgraph diagram ["flarelette-jwt-kit - @chrislyons-dev/flarelette-jwt - Components"]
+ subgraph diagram [" "]
style diagram fill:#ffffff,stroke:#ffffff
- subgraph 2 ["@chrislyons-dev/flarelette-jwt"]
+ subgraph 2 [" "]
style 2 fill:#ffffff,stroke:#2e6295,color:#2e6295
- 34("jwks.clearJwksCache
[Component: function]
Clear the JWKS cache (for
testing purposes)
")
- style 34 fill:#85bbf0,stroke:#5d82a8,color:#000000
- 35("jwks.clearHttpJwksCache
[Component: function]
Clear the HTTP JWKS cache
(for testing purposes)
")
- style 35 fill:#85bbf0,stroke:#5d82a8,color:#000000
- 36("jwks.fetchJwksFromService
[Component: function]
Fetch JWKS from a service
binding Implements 5-minute
caching to reduce load on
JWKS service
")
- style 36 fill:#85bbf0,stroke:#5d82a8,color:#000000
- 37("jwks.validateJwksUrl
[Component: function]
Validate JWKS URL for
security requirements
Requirements: - Must be valid
URL format - Must use HTTPS
(except
localhost/127.0.0.1/[::1] for
testing)
")
- style 37 fill:#85bbf0,stroke:#5d82a8,color:#000000
- 38("jwks.fetchJwksFromUrl
[Component: function]
Fetch JWKS from HTTP URL with
caching Implements
configurable TTL caching
(default 5 minutes) Security:
HTTPS-only (except
localhost), 5-second timeout,
100KB size limit
")
- style 38 fill:#85bbf0,stroke:#5d82a8,color:#000000
- 39("jwks.getKeyFromJwks
[Component: function]
Find and import a specific
key from JWKS by kid Supports
both EdDSA (Ed25519) and RSA
(RS256/RS384/RS512) keys
Algorithm is auto-detected
from key type (kty) and curve
(crv)
")
- style 39 fill:#85bbf0,stroke:#5d82a8,color:#000000
- 40("jwks.allowedThumbprints
[Component: function]
Get allowed thumbprints for
key pinning (optional
security measure)
")
- style 40 fill:#85bbf0,stroke:#5d82a8,color:#000000
+ 38("jwks.clearJwksCache
[Component: function]
Clear the JWKS cache (for
testing purposes)
")
+ style 38 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 39("jwks.clearHttpJwksCache
[Component: function]
Clear the HTTP JWKS cache
(for testing purposes)
")
+ style 39 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 40("jwks.fetchJwksFromService
[Component: function]
Fetch JWKS from a service
binding Implements 5-minute
caching to reduce load on
JWKS service
")
+ style 40 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 41("jwks.validateJwksUrl
[Component: function]
Validate JWKS URL for
security requirements
Requirements: - Must be valid
URL format - Must use HTTPS
(except
localhost/127.0.0.1/[::1] for
testing)
")
+ style 41 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 42("jwks.fetchJwksFromUrl
[Component: function]
Fetch JWKS from HTTP URL with
caching Implements
configurable TTL caching
(default 5 minutes) Security:
HTTPS-only (except
localhost), 5-second timeout,
100KB size limit
")
+ style 42 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 43("jwks.getKeyFromJwks
[Component: function]
Find and import a specific
key from JWKS by kid Supports
both EdDSA (Ed25519) and RSA
(RS256/RS384/RS512) keys
Algorithm is auto-detected
from key type (kty) and curve
(crv)
")
+ style 43 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 44("jwks.allowedThumbprints
[Component: function]
Get allowed thumbprints for
key pinning (optional
security measure)
")
+ style 44 fill:#d4e8fc,stroke:#94a2b0,color:#000000
end
end
\ No newline at end of file
diff --git a/docs/architecture/diagrams/mermaid/structurizr-Classes_chrislyons_dev_flarelette_jwt__util.mmd b/docs/architecture/diagrams/mermaid/structurizr-Classes_chrislyons_dev_flarelette_jwt__util.mmd
index 7145f66..1374864 100644
--- a/docs/architecture/diagrams/mermaid/structurizr-Classes_chrislyons_dev_flarelette_jwt__util.mmd
+++ b/docs/architecture/diagrams/mermaid/structurizr-Classes_chrislyons_dev_flarelette_jwt__util.mmd
@@ -1,32 +1,38 @@
-graph TB
+graph LR
linkStyle default fill:#ffffff
- subgraph diagram ["flarelette-jwt-kit - @chrislyons-dev/flarelette-jwt - Components"]
+ subgraph diagram [" "]
style diagram fill:#ffffff,stroke:#ffffff
- subgraph 2 ["@chrislyons-dev/flarelette-jwt"]
+ subgraph 2 [" "]
style 2 fill:#ffffff,stroke:#2e6295,color:#2e6295
- 30("util.createToken
[Component: function]
Create a signed JWT token
with optional claims
")
- style 30 fill:#85bbf0,stroke:#5d82a8,color:#000000
- 31("util.createDelegatedToken
[Component: function]
Create a delegated JWT token
following RFC 8693 actor
claim pattern Mints a new
short-lived token for use
within service boundaries
where a service acts on
behalf of the original end
user. This implements
zero-trust delegation: -
Preserves original user
identity (sub) and
permissions - Identifies the
acting service via 'act'
claim - Prevents permission
escalation by copying
original permissions Pattern:
"I'm
doing
work on behalf of user>" ")
- style 31 fill:#85bbf0,stroke:#5d82a8,color:#000000
- 32("util.checkAuth
[Component: function]
Verify and authorize a JWT
token with policy enforcement
")
- style 32 fill:#85bbf0,stroke:#5d82a8,color:#000000
- 33("util.policy
[Component: function]
Fluent builder for creating
authorization policies
")
- style 33 fill:#85bbf0,stroke:#5d82a8,color:#000000
- 41("util.main
[Component: function]
")
- style 41 fill:#85bbf0,stroke:#5d82a8,color:#000000
- 42("util.generateSecret
[Component: function]
")
- style 42 fill:#85bbf0,stroke:#5d82a8,color:#000000
- 43("util.isValidBase64UrlSecret
[Component: function]
")
- style 43 fill:#85bbf0,stroke:#5d82a8,color:#000000
- 45("util.parse
[Component: function]
Parse a JWT token into header
and payload without
verification
")
- style 45 fill:#85bbf0,stroke:#5d82a8,color:#000000
- 46("util.isExpiringSoon
[Component: function]
Check if JWT payload will
expire within specified
seconds
")
- style 46 fill:#85bbf0,stroke:#5d82a8,color:#000000
- 47("util.mapScopesToPermissions
[Component: function]
Map OAuth scopes to
permission strings
")
- style 47 fill:#85bbf0,stroke:#5d82a8,color:#000000
+ 32("util.createToken
[Component: function]
Create a signed JWT token
with optional claims
")
+ style 32 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 33("util.createDelegatedToken
[Component: function]
Create a delegated JWT token
following RFC 8693 actor
claim pattern Mints a new
short-lived token for use
within service boundaries
where a service acts on
behalf of the original end
user. This implements
zero-trust delegation: -
Preserves original user
identity (sub) and
permissions - Identifies the
acting service via 'act'
claim - Prevents permission
escalation by copying
original permissions Pattern:
"I'm
doing
work on behalf of user>" ")
+ style 33 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 34("util.signWithRequestBinding
[Component: function]
Sign a JWT token bound to a
specific HTTP request. Adds a
`req` claim containing
base64url(SHA-256(canonical
request)) to prevent replay
of a captured token against a
different endpoint within the
TTL window. Canonical form:
METHOD + "\ " + pathname +
search + "\ " + body bytes
")
+ style 34 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 35("util.verifyWithRequestBinding
[Component: function]
Verify a JWT token and
validate its request binding.
Re-computes the request hash
and compares it with the
`req` claim. Returns null on
any mismatch (fail-silent,
same as verify()). The `req`
claim is stripped from the
returned payload — it's an
implementation detail that
has already been validated.
")
+ style 35 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 36("util.checkAuth
[Component: function]
Verify and authorize a JWT
token with policy enforcement
")
+ style 36 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 37("util.policy
[Component: function]
Fluent builder for creating
authorization policies
")
+ style 37 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 45("util.main
[Component: function]
")
+ style 45 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 46("util.generateSecret
[Component: function]
")
+ style 46 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 47("util.isValidBase64UrlSecret
[Component: function]
")
+ style 47 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 49("util.parse
[Component: function]
Parse a JWT token into header
and payload without
verification
")
+ style 49 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 50("util.isExpiringSoon
[Component: function]
Check if JWT payload will
expire within specified
seconds
")
+ style 50 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 51("util.mapScopesToPermissions
[Component: function]
Map OAuth scopes to
permission strings
")
+ style 51 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 52("util.computeRequestHash
[Component: function]
Compute a deterministic
SHA-256 hash that binds a JWT
to a specific HTTP request.
Canonical form: UTF-8(METHOD
+ "\ " + pathname + search +
"\ ") || body_bytes - Method
is uppercased - Binds to path
and query string only (not
host/scheme — internal
Workers use different
hostnames) - Body is consumed
from a clone to preserve the
original stream
")
+ style 52 fill:#d4e8fc,stroke:#94a2b0,color:#000000
end
end
\ No newline at end of file
diff --git a/docs/architecture/diagrams/mermaid/structurizr-Classes_chrislyons_dev_flarelette_jwt__verify.mmd b/docs/architecture/diagrams/mermaid/structurizr-Classes_chrislyons_dev_flarelette_jwt__verify.mmd
index de12492..5150aae 100644
--- a/docs/architecture/diagrams/mermaid/structurizr-Classes_chrislyons_dev_flarelette_jwt__verify.mmd
+++ b/docs/architecture/diagrams/mermaid/structurizr-Classes_chrislyons_dev_flarelette_jwt__verify.mmd
@@ -1,16 +1,16 @@
-graph TB
+graph LR
linkStyle default fill:#ffffff
- subgraph diagram ["flarelette-jwt-kit - @chrislyons-dev/flarelette-jwt - Components"]
+ subgraph diagram [" "]
style diagram fill:#ffffff,stroke:#ffffff
- subgraph 2 ["@chrislyons-dev/flarelette-jwt"]
+ subgraph 2 [" "]
style 2 fill:#ffffff,stroke:#2e6295,color:#2e6295
- 48("verify.resolveVerificationKey
[Component: function]
Resolve verification key from
configured sources Implements
key resolution strategy
pattern: - Strategy 1: HS512
shared secret - Strategy 2:
Inline public JWK - Strategy
3: Service binding JWKS -
Strategy 4: HTTP JWKS URL
")
- style 48 fill:#85bbf0,stroke:#5d82a8,color:#000000
- 49("verify.verify
[Component: function]
Verify a JWT token with
HS512, EdDSA, or RSA
algorithms Supports multiple
key resolution strategies
with automatic algorithm
detection
")
- style 49 fill:#85bbf0,stroke:#5d82a8,color:#000000
+ 53("verify.resolveVerificationKey
[Component: function]
Resolve verification key from
configured sources Implements
key resolution strategy
pattern: - Strategy 1: HS512
shared secret - Strategy 2:
Inline public JWK - Strategy
3: Service binding JWKS -
Strategy 4: HTTP JWKS URL
")
+ style 53 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 54("verify.verify
[Component: function]
Verify a JWT token with
HS512, EdDSA, or RSA
algorithms Supports multiple
key resolution strategies
with automatic algorithm
detection
")
+ style 54 fill:#d4e8fc,stroke:#94a2b0,color:#000000
end
end
\ No newline at end of file
diff --git a/docs/architecture/diagrams/mermaid/structurizr-Classes_flarelette_jwt__adapters.mmd b/docs/architecture/diagrams/mermaid/structurizr-Classes_flarelette_jwt__adapters.mmd
index 0ac0ab7..a48ddca 100644
--- a/docs/architecture/diagrams/mermaid/structurizr-Classes_flarelette_jwt__adapters.mmd
+++ b/docs/architecture/diagrams/mermaid/structurizr-Classes_flarelette_jwt__adapters.mmd
@@ -1,14 +1,14 @@
-graph TB
+graph LR
linkStyle default fill:#ffffff
- subgraph diagram ["flarelette-jwt-kit - flarelette-jwt - Components"]
+ subgraph diagram [" "]
style diagram fill:#ffffff,stroke:#ffffff
- subgraph 60 ["flarelette-jwt"]
- style 60 fill:#ffffff,stroke:#2e6295,color:#2e6295
+ subgraph 65 [" "]
+ style 65 fill:#ffffff,stroke:#2e6295,color:#2e6295
- 65("adapters.apply_env_bindings
[Component: function]
Copy a Cloudflare Worker
`env` mapping into os.environ
so the kit can read it.
")
- style 65 fill:#85bbf0,stroke:#5d82a8,color:#000000
+ 70("adapters.apply_env_bindings
[Component: function]
Copy a Cloudflare Worker
`env` mapping into os.environ
so the kit can read it.
")
+ style 70 fill:#d4e8fc,stroke:#94a2b0,color:#000000
end
end
\ No newline at end of file
diff --git a/docs/architecture/diagrams/mermaid/structurizr-Classes_flarelette_jwt__explicit.mmd b/docs/architecture/diagrams/mermaid/structurizr-Classes_flarelette_jwt__explicit.mmd
index 0db7663..886049e 100644
--- a/docs/architecture/diagrams/mermaid/structurizr-Classes_flarelette_jwt__explicit.mmd
+++ b/docs/architecture/diagrams/mermaid/structurizr-Classes_flarelette_jwt__explicit.mmd
@@ -1,48 +1,74 @@
-graph TB
+graph LR
linkStyle default fill:#ffffff
- subgraph diagram ["flarelette-jwt-kit - flarelette-jwt - Components"]
+ subgraph diagram [" "]
style diagram fill:#ffffff,stroke:#ffffff
- subgraph 60 ["flarelette-jwt"]
- style 60 fill:#ffffff,stroke:#2e6295,color:#2e6295
+ subgraph 65 [" "]
+ style 65 fill:#ffffff,stroke:#2e6295,color:#2e6295
- 80("explicit.BaseJwtConfig
[Component: class]
Base JWT configuration shared
by HS512 and EdDSA modes.
")
- style 80 fill:#85bbf0,stroke:#5d82a8,color:#000000
- 81("explicit.HS512Config
[Component: class]
HS512 (HMAC-SHA512) symmetric
configuration.
")
- style 81 fill:#85bbf0,stroke:#5d82a8,color:#000000
- 82("explicit.EdDSASignConfig
[Component: class]
EdDSA (Ed25519) asymmetric
configuration for signing.
")
- style 82 fill:#85bbf0,stroke:#5d82a8,color:#000000
- 83("explicit.EdDSAVerifyConfig
[Component: class]
EdDSA (Ed25519) asymmetric
configuration for
verification.
")
- style 83 fill:#85bbf0,stroke:#5d82a8,color:#000000
- 84("explicit.AuthzOptsWithConfig
[Component: class]
Authorization options for
check_auth_with_config.
")
- style 84 fill:#85bbf0,stroke:#5d82a8,color:#000000
- 85("explicit.AuthUser
[Component: class]
Authenticated user
information.
")
- style 85 fill:#85bbf0,stroke:#5d82a8,color:#000000
- 86("explicit._b64url
[Component: function]
Encode bytes to base64url
without padding.
")
- style 86 fill:#85bbf0,stroke:#5d82a8,color:#000000
- 87("explicit._b64url_decode
[Component: function]
Decode base64url string (with
or without padding).
")
- style 87 fill:#85bbf0,stroke:#5d82a8,color:#000000
- 88("explicit.sign_with_config
[Component: function]
Sign a JWT token with
explicit configuration.
")
- style 88 fill:#85bbf0,stroke:#5d82a8,color:#000000
- 89("explicit.verify_with_config
[Component: function]
Verify a JWT token with
explicit configuration.
")
- style 89 fill:#85bbf0,stroke:#5d82a8,color:#000000
- 90("explicit.create_token_with_config
[Component: function]
Create a signed JWT token
with explicit configuration.
")
- style 90 fill:#85bbf0,stroke:#5d82a8,color:#000000
- 91("explicit.create_delegated_token_with_config
[Component: function]
Create a delegated JWT token
with explicit configuration.
")
- style 91 fill:#85bbf0,stroke:#5d82a8,color:#000000
- 92("explicit.check_auth_with_config
[Component: function]
Verify and authorize a JWT
token with explicit
configuration.
")
- style 92 fill:#85bbf0,stroke:#5d82a8,color:#000000
- 93("explicit.create_hs512_config
[Component: function]
Helper function to create
HS512 config from
base64url-encoded secret.
")
- style 93 fill:#85bbf0,stroke:#5d82a8,color:#000000
- 94("explicit.create_eddsa_sign_config
[Component: function]
Helper function to create
EdDSA sign config from JWK.
")
- style 94 fill:#85bbf0,stroke:#5d82a8,color:#000000
- 95("explicit.create_eddsa_verify_config
[Component: function]
Helper function to create
EdDSA verify config from JWK.
")
- style 95 fill:#85bbf0,stroke:#5d82a8,color:#000000
- 96("explicit.SignConfig
[Component: type]
")
- style 96 fill:#85bbf0,stroke:#5d82a8,color:#000000
- 97("explicit.VerifyConfig
[Component: type]
")
- style 97 fill:#85bbf0,stroke:#5d82a8,color:#000000
+ 100("explicit._find_jwk_by_kid
[Component: function]
")
+ style 100 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 101("explicit._import_verify_key
[Component: function]
")
+ style 101 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 102("explicit._has_public_jwk
[Component: function]
")
+ style 102 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 103("explicit._has_jwks_url
[Component: function]
")
+ style 103 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 104("explicit._verify_asymmetric_signature
[Component: function]
")
+ style 104 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 105("explicit.sign_with_config
[Component: function]
Sign a JWT token with
explicit configuration.
")
+ style 105 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 106("explicit.verify_with_config
[Component: function]
Verify a JWT token with
explicit configuration.
")
+ style 106 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 107("explicit.create_token_with_config
[Component: function]
Create a signed JWT token
with explicit configuration.
")
+ style 107 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 108("explicit.create_delegated_token_with_config
[Component: function]
Create a delegated JWT token
with explicit configuration.
")
+ style 108 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 109("explicit.check_auth_with_config
[Component: function]
Verify and authorize a JWT
token with explicit
configuration.
")
+ style 109 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 110("explicit.create_hs512_config
[Component: function]
Helper function to create
HS512 config from
base64url-encoded secret.
")
+ style 110 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 111("explicit.create_eddsa_sign_config
[Component: function]
Helper function to create
EdDSA sign config from JWK.
")
+ style 111 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 112("explicit.create_eddsa_verify_config
[Component: function]
Helper function to create
EdDSA verify config from JWK.
")
+ style 112 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 113("explicit.create_es512_verify_config
[Component: function]
Helper function to create
ES512 verify config from a
public JWK.
")
+ style 113 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 114("explicit.create_jwks_url_verify_config
[Component: function]
Helper function to create
JWKS URL verification config.
")
+ style 114 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 115("explicit.SignConfig
[Component: type]
")
+ style 115 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 116("explicit.VerifyConfig
[Component: type]
")
+ style 116 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 86("explicit.BaseJwtConfig
[Component: class]
Base JWT configuration shared
by HS512 and EdDSA modes.
")
+ style 86 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 87("explicit.HS512Config
[Component: class]
HS512 (HMAC-SHA512) symmetric
configuration.
")
+ style 87 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 88("explicit.EdDSASignConfig
[Component: class]
EdDSA (Ed25519) asymmetric
configuration for signing.
")
+ style 88 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 89("explicit.EdDSAVerifyConfig
[Component: class]
EdDSA (Ed25519) asymmetric
configuration for
verification.
")
+ style 89 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 90("explicit.ES512VerifyConfig
[Component: class]
ES512 (ECDSA P-521)
asymmetric configuration for
verification.
")
+ style 90 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 91("explicit.JWKSUrlVerifyConfig
[Component: class]
Asymmetric verification
configuration backed by a
remote JWKS URL.
")
+ style 91 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 92("explicit.AuthzOptsWithConfig
[Component: class]
Authorization options for
check_auth_with_config.
")
+ style 92 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 93("explicit.AuthUser
[Component: class]
Authenticated user
information.
")
+ style 93 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 94("explicit._b64url
[Component: function]
Encode bytes to base64url
without padding.
")
+ style 94 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 95("explicit._b64url_decode
[Component: function]
Decode base64url string (with
or without padding).
")
+ style 95 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 96("explicit._validate_jwks_url
[Component: function]
")
+ style 96 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 97("explicit._ecdsa_curve_name
[Component: function]
")
+ style 97 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 98("explicit._hash_name
[Component: function]
")
+ style 98 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 99("explicit._fetch_jwks_from_url
[Component: function]
")
+ style 99 fill:#d4e8fc,stroke:#94a2b0,color:#000000
end
end
\ No newline at end of file
diff --git a/docs/architecture/diagrams/mermaid/structurizr-Classes_flarelette_jwt__util.mmd b/docs/architecture/diagrams/mermaid/structurizr-Classes_flarelette_jwt__util.mmd
index a6caace..fac6b81 100644
--- a/docs/architecture/diagrams/mermaid/structurizr-Classes_flarelette_jwt__util.mmd
+++ b/docs/architecture/diagrams/mermaid/structurizr-Classes_flarelette_jwt__util.mmd
@@ -1,104 +1,106 @@
-graph TB
+graph LR
linkStyle default fill:#ffffff
- subgraph diagram ["flarelette-jwt-kit - flarelette-jwt - Components"]
+ subgraph diagram [" "]
style diagram fill:#ffffff,stroke:#ffffff
- subgraph 60 ["flarelette-jwt"]
- style 60 fill:#ffffff,stroke:#2e6295,color:#2e6295
+ subgraph 65 [" "]
+ style 65 fill:#ffffff,stroke:#2e6295,color:#2e6295
- 100("util.PolicyBuilder.base
[Component: method]
")
- style 100 fill:#85bbf0,stroke:#5d82a8,color:#000000
- 101("util.PolicyBuilder.need_all
[Component: method]
")
- style 101 fill:#85bbf0,stroke:#5d82a8,color:#000000
- 102("util.PolicyBuilder.need_any
[Component: method]
")
- style 102 fill:#85bbf0,stroke:#5d82a8,color:#000000
- 103("util.PolicyBuilder.roles_all
[Component: method]
")
- style 103 fill:#85bbf0,stroke:#5d82a8,color:#000000
- 104("util.PolicyBuilder.roles_any
[Component: method]
")
- style 104 fill:#85bbf0,stroke:#5d82a8,color:#000000
- 105("util.PolicyBuilder.where
[Component: method]
")
- style 105 fill:#85bbf0,stroke:#5d82a8,color:#000000
- 106("util.PolicyBuilder.build
[Component: method]
")
- style 106 fill:#85bbf0,stroke:#5d82a8,color:#000000
- 107("util.Builder
[Component: class]
")
- style 107 fill:#85bbf0,stroke:#5d82a8,color:#000000
- 108("util.Builder.base
[Component: method]
")
- style 108 fill:#85bbf0,stroke:#5d82a8,color:#000000
- 109("util.Builder.need_all
[Component: method]
")
- style 109 fill:#85bbf0,stroke:#5d82a8,color:#000000
- 110("util.Builder.need_any
[Component: method]
")
- style 110 fill:#85bbf0,stroke:#5d82a8,color:#000000
- 111("util.Builder.roles_all
[Component: method]
")
- style 111 fill:#85bbf0,stroke:#5d82a8,color:#000000
- 112("util.Builder.roles_any
[Component: method]
")
- style 112 fill:#85bbf0,stroke:#5d82a8,color:#000000
- 113("util.Builder.where
[Component: method]
")
- style 113 fill:#85bbf0,stroke:#5d82a8,color:#000000
- 114("util.Builder.build
[Component: method]
")
- style 114 fill:#85bbf0,stroke:#5d82a8,color:#000000
- 115("util.create_token
[Component: function]
Create a signed JWT token
with optional claims.
")
- style 115 fill:#85bbf0,stroke:#5d82a8,color:#000000
- 116("util.create_delegated_token
[Component: function]
Create a delegated JWT token
following RFC 8693 actor
claim pattern.
")
- style 116 fill:#85bbf0,stroke:#5d82a8,color:#000000
- 117("util.check_auth
[Component: function]
Verify and authorize a JWT
token with policy
enforcement.
")
- style 117 fill:#85bbf0,stroke:#5d82a8,color:#000000
- 118("util.policy
[Component: function]
Fluent builder for creating
authorization policies.
")
- style 118 fill:#85bbf0,stroke:#5d82a8,color:#000000
- 119("util.generate_secret
[Component: function]
")
- style 119 fill:#85bbf0,stroke:#5d82a8,color:#000000
- 120("util.is_valid_base64url_secret
[Component: function]
")
- style 120 fill:#85bbf0,stroke:#5d82a8,color:#000000
- 121("util.main
[Component: function]
")
- style 121 fill:#85bbf0,stroke:#5d82a8,color:#000000
- 122("util._b64url
[Component: function]
")
- style 122 fill:#85bbf0,stroke:#5d82a8,color:#000000
- 123("util.sign
[Component: function]
Sign a JWT token with HS512
or EdDSA algorithm.
")
- style 123 fill:#85bbf0,stroke:#5d82a8,color:#000000
- 124("util.ParsedJwt
[Component: class]
Parsed JWT token structure.
")
- style 124 fill:#85bbf0,stroke:#5d82a8,color:#000000
- 125("util.parse
[Component: function]
Parse a JWT token into header
and payload without
verification.
")
- style 125 fill:#85bbf0,stroke:#5d82a8,color:#000000
- 126("util.is_expiring_soon
[Component: function]
Check if JWT payload will
expire within specified
seconds.
")
- style 126 fill:#85bbf0,stroke:#5d82a8,color:#000000
- 127("util.map_scopes_to_permissions
[Component: function]
Map OAuth scopes to
permission strings.
")
- style 127 fill:#85bbf0,stroke:#5d82a8,color:#000000
- 128("util._b64url_decode
[Component: function]
")
- style 128 fill:#85bbf0,stroke:#5d82a8,color:#000000
- 129("util.verify
[Component: function]
Verify a JWT token with HS512
or EdDSA algorithm.
")
- style 129 fill:#85bbf0,stroke:#5d82a8,color:#000000
- 66("util.JwtHeader
[Component: class]
JWT token header structure.
")
- style 66 fill:#85bbf0,stroke:#5d82a8,color:#000000
- 67("util.ActorClaim
[Component: class]
Actor claim for service
delegation (RFC 8693).
")
- style 67 fill:#85bbf0,stroke:#5d82a8,color:#000000
- 68("util.JwtPayload
[Component: class]
JWT token payload/claims
structure.
")
- style 68 fill:#85bbf0,stroke:#5d82a8,color:#000000
- 69("util.JwtProfile
[Component: class]
JWT Profile structure
matching
flarelette-jwt.profile.schema.json.
")
- style 69 fill:#85bbf0,stroke:#5d82a8,color:#000000
- 70("util.JwtCommonConfig
[Component: class]
Common JWT configuration from
environment variables.
")
- style 70 fill:#85bbf0,stroke:#5d82a8,color:#000000
- 71("util.mode
[Component: function]
Detect JWT algorithm mode
from environment variables
based on role.
")
- style 71 fill:#85bbf0,stroke:#5d82a8,color:#000000
- 72("util.common
[Component: function]
Get common JWT configuration
from environment.
")
- style 72 fill:#85bbf0,stroke:#5d82a8,color:#000000
- 73("util.profile
[Component: function]
Get JWT profile from
environment.
")
- style 73 fill:#85bbf0,stroke:#5d82a8,color:#000000
- 74("util._get_indirect
[Component: function]
")
- style 74 fill:#85bbf0,stroke:#5d82a8,color:#000000
- 75("util.get_hs_secret_bytes
[Component: function]
")
- style 75 fill:#85bbf0,stroke:#5d82a8,color:#000000
- 76("util.get_public_jwk_string
[Component: function]
")
- style 76 fill:#85bbf0,stroke:#5d82a8,color:#000000
- 77("util.AlgType
[Component: type]
")
- style 77 fill:#85bbf0,stroke:#5d82a8,color:#000000
- 78("util.JwtValue
[Component: type]
")
- style 78 fill:#85bbf0,stroke:#5d82a8,color:#000000
- 79("util.ClaimsDict
[Component: type]
")
- style 79 fill:#85bbf0,stroke:#5d82a8,color:#000000
- 98("util.AuthUser
[Component: class]
Authenticated user
information returned by
check_auth.
")
- style 98 fill:#85bbf0,stroke:#5d82a8,color:#000000
- 99("util.PolicyBuilder
[Component: class]
Builder interface for
creating JWT authorization
policies.
")
- style 99 fill:#85bbf0,stroke:#5d82a8,color:#000000
+ 117("util.AuthUser
[Component: class]
Authenticated user
information returned by
check_auth.
")
+ style 117 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 118("util.PolicyBuilder
[Component: class]
Builder interface for
creating JWT authorization
policies.
")
+ style 118 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 119("util.PolicyBuilder.base
[Component: method]
")
+ style 119 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 120("util.PolicyBuilder.need_all
[Component: method]
")
+ style 120 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 121("util.PolicyBuilder.need_any
[Component: method]
")
+ style 121 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 122("util.PolicyBuilder.roles_all
[Component: method]
")
+ style 122 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 123("util.PolicyBuilder.roles_any
[Component: method]
")
+ style 123 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 124("util.PolicyBuilder.where
[Component: method]
")
+ style 124 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 125("util.PolicyBuilder.build
[Component: method]
")
+ style 125 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 126("util.Builder
[Component: class]
")
+ style 126 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 127("util.Builder.base
[Component: method]
")
+ style 127 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 128("util.Builder.need_all
[Component: method]
")
+ style 128 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 129("util.Builder.need_any
[Component: method]
")
+ style 129 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 130("util.Builder.roles_all
[Component: method]
")
+ style 130 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 131("util.Builder.roles_any
[Component: method]
")
+ style 131 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 132("util.Builder.where
[Component: method]
")
+ style 132 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 133("util.Builder.build
[Component: method]
")
+ style 133 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 134("util.create_token
[Component: function]
Create a signed JWT token
with optional claims.
")
+ style 134 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 135("util.create_delegated_token
[Component: function]
Create a delegated JWT token
following RFC 8693 actor
claim pattern.
")
+ style 135 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 136("util.check_auth
[Component: function]
Verify and authorize a JWT
token with policy
enforcement.
")
+ style 136 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 137("util.policy
[Component: function]
Fluent builder for creating
authorization policies.
")
+ style 137 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 138("util.generate_secret
[Component: function]
")
+ style 138 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 139("util.is_valid_base64url_secret
[Component: function]
")
+ style 139 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 140("util.main
[Component: function]
")
+ style 140 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 141("util._b64url
[Component: function]
")
+ style 141 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 142("util.sign
[Component: function]
Sign a JWT token with HS512
or EdDSA algorithm.
")
+ style 142 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 143("util.ParsedJwt
[Component: class]
Parsed JWT token structure.
")
+ style 143 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 144("util.parse
[Component: function]
Parse a JWT token into header
and payload without
verification.
")
+ style 144 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 145("util.is_expiring_soon
[Component: function]
Check if JWT payload will
expire within specified
seconds.
")
+ style 145 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 146("util.map_scopes_to_permissions
[Component: function]
Map OAuth scopes to
permission strings.
")
+ style 146 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 147("util._b64url_decode
[Component: function]
")
+ style 147 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 148("util.verify
[Component: function]
Verify a JWT token with HS512
or EdDSA algorithm.
")
+ style 148 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 71("util.JwtHeader
[Component: class]
JWT token header structure.
")
+ style 71 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 72("util.ActorClaim
[Component: class]
Actor claim for service
delegation (RFC 8693).
")
+ style 72 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 73("util.JwtPayload
[Component: class]
JWT token payload/claims
structure.
")
+ style 73 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 74("util.JwtProfile
[Component: class]
JWT Profile structure
matching
flarelette-jwt.profile.schema.json.
")
+ style 74 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 75("util.JwtCommonConfig
[Component: class]
Common JWT configuration from
environment variables.
")
+ style 75 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 76("util.mode
[Component: function]
Detect JWT algorithm mode
from environment variables
based on role.
")
+ style 76 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 77("util.common
[Component: function]
Get common JWT configuration
from environment.
")
+ style 77 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 78("util.profile
[Component: function]
Get JWT profile from
environment.
")
+ style 78 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 79("util._get_indirect
[Component: function]
")
+ style 79 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 80("util.get_hs_secret_bytes
[Component: function]
")
+ style 80 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 81("util.get_public_jwk_string
[Component: function]
")
+ style 81 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 82("util.get_jwks_url
[Component: function]
")
+ style 82 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 83("util.AlgType
[Component: type]
")
+ style 83 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 84("util.JwtValue
[Component: type]
")
+ style 84 fill:#d4e8fc,stroke:#94a2b0,color:#000000
+ 85("util.ClaimsDict
[Component: type]
")
+ style 85 fill:#d4e8fc,stroke:#94a2b0,color:#000000
end
end
\ No newline at end of file
diff --git a/docs/architecture/diagrams/mermaid/structurizr-Components__chrislyons_dev_flarelette_jwt.mmd b/docs/architecture/diagrams/mermaid/structurizr-Components__chrislyons_dev_flarelette_jwt.mmd
index f38b815..47472fc 100644
--- a/docs/architecture/diagrams/mermaid/structurizr-Components__chrislyons_dev_flarelette_jwt.mmd
+++ b/docs/architecture/diagrams/mermaid/structurizr-Components__chrislyons_dev_flarelette_jwt.mmd
@@ -1,10 +1,10 @@
-graph TB
+graph LR
linkStyle default fill:#ffffff
- subgraph diagram ["flarelette-jwt-kit - @chrislyons-dev/flarelette-jwt - Components"]
+ subgraph diagram [" "]
style diagram fill:#ffffff,stroke:#ffffff
- subgraph 2 ["@chrislyons-dev/flarelette-jwt"]
+ subgraph 2 [" "]
style 2 fill:#ffffff,stroke:#2e6295,color:#2e6295
10("adapters
[Component: module]
Component inferred from
directory: adapters
")
@@ -13,7 +13,7 @@ graph TB
style 3 fill:#85bbf0,stroke:#5d82a8,color:#000000
4("explicit
[Component: module]
Explicit configuration API
for JWT operations. This
module provides functions
that accept explicit
configuration objects instead
of relying on environment
variables or global state.
Use this API when you need
full control over
configuration, especially in
development environments or
when working with multiple
JWT configurations.
")
style 4 fill:#85bbf0,stroke:#5d82a8,color:#000000
- 5("util
[Component: module]
High-level JWT utilities for
creating, delegating,
verifying, and authorizing
JWT tokens | Key generation
utility for EdDSA keys. This
script generates EdDSA key
pairs and exports them in JWK
format. It is designed to be
executed as a standalone
Node.js script. | Secret
generation and validation
utilities. This module
provides functions to
generate secure secrets and
validate base64url-encoded
secrets. It ensures
compatibility with JWT
signing requirements. |
Utility functions for JWT
operations. This module
provides helper functions for
parsing JWTs, checking
expiration, and mapping OAuth
scopes. It is designed to
support core JWT
functionalities.
")
+ 5("util
[Component: module]
High-level JWT utilities for
creating, delegating,
verifying, and authorizing
JWT tokens | Key generation
utility for EdDSA and ECDSA
keys. Generates asymmetric
key pairs and exports them in
JWK format. Designed to be
executed as a standalone
Node.js script. | Secret
generation and validation
utilities. This module
provides functions to
generate secure secrets and
validate base64url-encoded
secrets. It ensures
compatibility with JWT
signing requirements. |
Utility functions for JWT
operations. This module
provides helper functions for
parsing JWTs, checking
expiration, and mapping OAuth
scopes. It is designed to
support core JWT
functionalities.
")
style 5 fill:#85bbf0,stroke:#5d82a8,color:#000000
6("main
[Component: module]
Entry point for the
flarelette-jwt library. This
module re-exports core
functionalities, including
signing, verification,
utilities, and type
definitions. It serves as the
main interface for library
consumers.
")
style 6 fill:#85bbf0,stroke:#5d82a8,color:#000000
diff --git a/docs/architecture/diagrams/mermaid/structurizr-Components_flarelette_jwt.mmd b/docs/architecture/diagrams/mermaid/structurizr-Components_flarelette_jwt.mmd
index bfd601c..62ae96d 100644
--- a/docs/architecture/diagrams/mermaid/structurizr-Components_flarelette_jwt.mmd
+++ b/docs/architecture/diagrams/mermaid/structurizr-Components_flarelette_jwt.mmd
@@ -1,20 +1,20 @@
-graph TB
+graph LR
linkStyle default fill:#ffffff
- subgraph diagram ["flarelette-jwt-kit - flarelette-jwt - Components"]
+ subgraph diagram [" "]
style diagram fill:#ffffff,stroke:#ffffff
- subgraph 60 ["flarelette-jwt"]
- style 60 fill:#ffffff,stroke:#2e6295,color:#2e6295
+ subgraph 65 [" "]
+ style 65 fill:#ffffff,stroke:#2e6295,color:#2e6295
- 61("adapters
[Component: module]
Adapters for Cloudflare
Workers Environment This
module provides utilities to
adapt Cloudflare Workers
environment variables for use
with the Flarelette JWT
library.
")
- style 61 fill:#85bbf0,stroke:#5d82a8,color:#000000
- 62("util
[Component: module]
Environment Configuration for
JWT Operations This module
provides functions to read
environment variables and
derive JWT-related
configurations. It supports
both symmetric (HS512) and
asymmetric (EdDSA)
algorithms.
")
- style 62 fill:#85bbf0,stroke:#5d82a8,color:#000000
- 63("explicit
[Component: module]
Explicit Configuration API
for JWT Operations This
module provides functions
that accept explicit
configuration objects instead
of relying on environment
variables or global state.
Use this API when you need
full control over
configuration, especially in
development environments or
when working with multiple
JWT configurations.
")
- style 63 fill:#85bbf0,stroke:#5d82a8,color:#000000
- 64("flarelette_jwt
[Component: module]
Component derived from
directory: flarelette_jwt
")
- style 64 fill:#85bbf0,stroke:#5d82a8,color:#000000
+ 66("adapters
[Component: module]
Adapters for Cloudflare
Workers Environment This
module provides utilities to
adapt Cloudflare Workers
environment variables for use
with the Flarelette JWT
library.
")
+ style 66 fill:#85bbf0,stroke:#5d82a8,color:#000000
+ 67("util
[Component: module]
Environment Configuration for
JWT Operations This module
provides functions to read
environment variables and
derive JWT-related
configurations. It supports
both symmetric (HS512) and
asymmetric (EdDSA)
algorithms.
")
+ style 67 fill:#85bbf0,stroke:#5d82a8,color:#000000
+ 68("explicit
[Component: module]
Explicit Configuration API
for JWT Operations This
module provides functions
that accept explicit
configuration objects instead
of relying on environment
variables or global state.
Use this API when you need
full control over
configuration, especially in
development environments or
when working with multiple
JWT configurations.
")
+ style 68 fill:#85bbf0,stroke:#5d82a8,color:#000000
+ 69("flarelette_jwt
[Component: module]
Component derived from
directory: flarelette_jwt
")
+ style 69 fill:#85bbf0,stroke:#5d82a8,color:#000000
end
end
\ No newline at end of file
diff --git a/docs/architecture/diagrams/mermaid/structurizr-Containers.mmd b/docs/architecture/diagrams/mermaid/structurizr-Containers.mmd
index 083e179..c03c130 100644
--- a/docs/architecture/diagrams/mermaid/structurizr-Containers.mmd
+++ b/docs/architecture/diagrams/mermaid/structurizr-Containers.mmd
@@ -1,16 +1,16 @@
-graph TB
+graph LR
linkStyle default fill:#ffffff
- subgraph diagram ["flarelette-jwt-kit - Containers"]
+ subgraph diagram [" "]
style diagram fill:#ffffff,stroke:#ffffff
- subgraph 1 ["flarelette-jwt-kit"]
+ subgraph 1 [" "]
style 1 fill:#ffffff,stroke:#0b4884,color:#0b4884
- 2("@chrislyons-dev/flarelette-jwt
[Container: Service]
Environment-driven JWT
authentication for Cloudflare
Workers with secret-name
indirection
")
+ 2("@chrislyons-dev/flarelette-jwt
[Container: Service]
TypeScript implementation of
the Flarelette JWT Kit: An
environment-driven JWT
authentication package for
Cloudflare Workers
")
style 2 fill:#438dd5,stroke:#2e6295,color:#ffffff
- 60("flarelette-jwt
[Container: Service]
Environment-driven JWT
authentication for Cloudflare
Workers Python with
secret-name indirection
")
- style 60 fill:#438dd5,stroke:#2e6295,color:#ffffff
+ 65("flarelette-jwt
[Container: Service]
Python implementation of the
Flarelette JWT Kit: An
environment-driven JWT
authentication package for
Cloudflare Workers
")
+ style 65 fill:#438dd5,stroke:#2e6295,color:#ffffff
end
end
\ No newline at end of file
diff --git a/docs/architecture/diagrams/mermaid/structurizr-SystemContext.mmd b/docs/architecture/diagrams/mermaid/structurizr-SystemContext.mmd
index 5f8e5da..59b3eed 100644
--- a/docs/architecture/diagrams/mermaid/structurizr-SystemContext.mmd
+++ b/docs/architecture/diagrams/mermaid/structurizr-SystemContext.mmd
@@ -1,7 +1,7 @@
-graph TB
+graph LR
linkStyle default fill:#ffffff
- subgraph diagram ["flarelette-jwt-kit - System Context"]
+ subgraph diagram [" "]
style diagram fill:#ffffff,stroke:#ffffff
1("flarelette-jwt-kit
[Software System]
JWT authentication and
authorization library
")
diff --git a/docs/architecture/diagrams/plantuml/structurizr-Classes_chrislyons_dev_flarelette_jwt__adapters-key.puml b/docs/architecture/diagrams/plantuml/structurizr-Classes_chrislyons_dev_flarelette_jwt__adapters-key.puml
index da75bcd..d2ad682 100644
--- a/docs/architecture/diagrams/plantuml/structurizr-Classes_chrislyons_dev_flarelette_jwt__adapters-key.puml
+++ b/docs/architecture/diagrams/plantuml/structurizr-Classes_chrislyons_dev_flarelette_jwt__adapters-key.puml
@@ -18,12 +18,12 @@ skinparam rectangle<<_transparent>> {
}
skinparam rectangle<<1>> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
}
-rectangle "==Component" <<1>>
+rectangle "==Component, Code" <<1>>
@enduml
\ No newline at end of file
diff --git a/docs/architecture/diagrams/plantuml/structurizr-Classes_chrislyons_dev_flarelette_jwt__adapters.puml b/docs/architecture/diagrams/plantuml/structurizr-Classes_chrislyons_dev_flarelette_jwt__adapters.puml
index 7c1529a..5256a01 100644
--- a/docs/architecture/diagrams/plantuml/structurizr-Classes_chrislyons_dev_flarelette_jwt__adapters.puml
+++ b/docs/architecture/diagrams/plantuml/structurizr-Classes_chrislyons_dev_flarelette_jwt__adapters.puml
@@ -2,9 +2,9 @@
set separator none
title flarelette-jwt-kit - @chrislyons-dev/flarelette-jwt - Components
-top to bottom direction
-skinparam ranksep 60
-skinparam nodesep 30
+left to right direction
+skinparam ranksep 20
+skinparam nodesep 10
skinparam {
arrowFontSize 10
@@ -17,23 +17,23 @@ skinparam {
hide stereotype
skinparam rectangle<> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
shadowing false
}
skinparam rectangle<> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
shadowing false
}
skinparam rectangle<> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
shadowing false
}
diff --git a/docs/architecture/diagrams/plantuml/structurizr-Classes_chrislyons_dev_flarelette_jwt__core-key.puml b/docs/architecture/diagrams/plantuml/structurizr-Classes_chrislyons_dev_flarelette_jwt__core-key.puml
index da75bcd..d2ad682 100644
--- a/docs/architecture/diagrams/plantuml/structurizr-Classes_chrislyons_dev_flarelette_jwt__core-key.puml
+++ b/docs/architecture/diagrams/plantuml/structurizr-Classes_chrislyons_dev_flarelette_jwt__core-key.puml
@@ -18,12 +18,12 @@ skinparam rectangle<<_transparent>> {
}
skinparam rectangle<<1>> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
}
-rectangle "==Component" <<1>>
+rectangle "==Component, Code" <<1>>
@enduml
\ No newline at end of file
diff --git a/docs/architecture/diagrams/plantuml/structurizr-Classes_chrislyons_dev_flarelette_jwt__core.puml b/docs/architecture/diagrams/plantuml/structurizr-Classes_chrislyons_dev_flarelette_jwt__core.puml
index a6abeb9..3d0da52 100644
--- a/docs/architecture/diagrams/plantuml/structurizr-Classes_chrislyons_dev_flarelette_jwt__core.puml
+++ b/docs/architecture/diagrams/plantuml/structurizr-Classes_chrislyons_dev_flarelette_jwt__core.puml
@@ -2,9 +2,9 @@
set separator none
title flarelette-jwt-kit - @chrislyons-dev/flarelette-jwt - Components
-top to bottom direction
-skinparam ranksep 60
-skinparam nodesep 30
+left to right direction
+skinparam ranksep 20
+skinparam nodesep 10
skinparam {
arrowFontSize 10
@@ -17,79 +17,79 @@ skinparam {
hide stereotype
skinparam rectangle<> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
shadowing false
}
skinparam rectangle<> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
shadowing false
}
skinparam rectangle<> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
shadowing false
}
skinparam rectangle<> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
shadowing false
}
skinparam rectangle<> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
shadowing false
}
skinparam rectangle<> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
shadowing false
}
skinparam rectangle<> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
shadowing false
}
skinparam rectangle<> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
shadowing false
}
skinparam rectangle<> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
shadowing false
}
skinparam rectangle<> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
shadowing false
}
skinparam rectangle<> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
shadowing false
}
diff --git a/docs/architecture/diagrams/plantuml/structurizr-Classes_chrislyons_dev_flarelette_jwt__explicit-key.puml b/docs/architecture/diagrams/plantuml/structurizr-Classes_chrislyons_dev_flarelette_jwt__explicit-key.puml
index da75bcd..d2ad682 100644
--- a/docs/architecture/diagrams/plantuml/structurizr-Classes_chrislyons_dev_flarelette_jwt__explicit-key.puml
+++ b/docs/architecture/diagrams/plantuml/structurizr-Classes_chrislyons_dev_flarelette_jwt__explicit-key.puml
@@ -18,12 +18,12 @@ skinparam rectangle<<_transparent>> {
}
skinparam rectangle<<1>> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
}
-rectangle "==Component" <<1>>
+rectangle "==Component, Code" <<1>>
@enduml
\ No newline at end of file
diff --git a/docs/architecture/diagrams/plantuml/structurizr-Classes_chrislyons_dev_flarelette_jwt__explicit.puml b/docs/architecture/diagrams/plantuml/structurizr-Classes_chrislyons_dev_flarelette_jwt__explicit.puml
index 08d212e..6d1bbc8 100644
--- a/docs/architecture/diagrams/plantuml/structurizr-Classes_chrislyons_dev_flarelette_jwt__explicit.puml
+++ b/docs/architecture/diagrams/plantuml/structurizr-Classes_chrislyons_dev_flarelette_jwt__explicit.puml
@@ -2,9 +2,9 @@
set separator none
title flarelette-jwt-kit - @chrislyons-dev/flarelette-jwt - Components
-top to bottom direction
-skinparam ranksep 60
-skinparam nodesep 30
+left to right direction
+skinparam ranksep 20
+skinparam nodesep 10
skinparam {
arrowFontSize 10
@@ -17,65 +17,79 @@ skinparam {
hide stereotype
skinparam rectangle<> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
shadowing false
}
skinparam rectangle<> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
+ roundCorner 20
+ shadowing false
+}
+skinparam rectangle<> {
+ BackgroundColor #d4e8fc
+ FontColor #000000
+ BorderColor #94a2b0
+ roundCorner 20
+ shadowing false
+}
+skinparam rectangle<> {
+ BackgroundColor #d4e8fc
+ FontColor #000000
+ BorderColor #94a2b0
roundCorner 20
shadowing false
}
skinparam rectangle<> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
shadowing false
}
skinparam rectangle<> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
shadowing false
}
skinparam rectangle<> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
shadowing false
}
skinparam rectangle<> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
shadowing false
}
skinparam rectangle<> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
shadowing false
}
skinparam rectangle<> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
shadowing false
}
skinparam rectangle<> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
shadowing false
}
@@ -94,7 +108,9 @@ rectangle "@chrislyons-dev/flarelette-jwt\n[Container: Service]"
rectangle "==explicit.createHS512Config\n[Component: function]\n\nHelper function to create HS512 config from base64url-encoded secret" <> as flarelettejwtkit.chrislyonsdevflarelettejwt.explicitcreateHS512Config
rectangle "==explicit.createEdDSASignConfig\n[Component: function]\n\nHelper function to create EdDSA sign config from JWK" <> as flarelettejwtkit.chrislyonsdevflarelettejwt.explicitcreateEdDSASignConfig
rectangle "==explicit.createEdDSAVerifyConfig\n[Component: function]\n\nHelper function to create EdDSA verify config from JWK" <> as flarelettejwtkit.chrislyonsdevflarelettejwt.explicitcreateEdDSAVerifyConfig
- rectangle "==explicit.createJWKSUrlVerifyConfig\n[Component: function]\n\nHelper function to create HTTP JWKS URL verification config Enables testing without environment variables by providing explicit configuration" <> as flarelettejwtkit.chrislyonsdevflarelettejwt.explicitcreateJWKSUrlVerifyConfig
+ rectangle "==explicit.createES512SignConfig\n[Component: function]\n\nHelper function to create ES512 sign config from a P-521 EC private JWK" <> as flarelettejwtkit.chrislyonsdevflarelettejwt.explicitcreateES512SignConfig
+ rectangle "==explicit.createES512VerifyConfig\n[Component: function]\n\nHelper function to create ES512 verify config from a P-521 EC public JWK" <> as flarelettejwtkit.chrislyonsdevflarelettejwt.explicitcreateES512VerifyConfig
+ rectangle "==explicit.createJWKSUrlVerifyConfig\n[Component: function]" <> as flarelettejwtkit.chrislyonsdevflarelettejwt.explicitcreateJWKSUrlVerifyConfig
}
@enduml
\ No newline at end of file
diff --git a/docs/architecture/diagrams/plantuml/structurizr-Classes_chrislyons_dev_flarelette_jwt__jwks-key.puml b/docs/architecture/diagrams/plantuml/structurizr-Classes_chrislyons_dev_flarelette_jwt__jwks-key.puml
index da75bcd..d2ad682 100644
--- a/docs/architecture/diagrams/plantuml/structurizr-Classes_chrislyons_dev_flarelette_jwt__jwks-key.puml
+++ b/docs/architecture/diagrams/plantuml/structurizr-Classes_chrislyons_dev_flarelette_jwt__jwks-key.puml
@@ -18,12 +18,12 @@ skinparam rectangle<<_transparent>> {
}
skinparam rectangle<<1>> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
}
-rectangle "==Component" <<1>>
+rectangle "==Component, Code" <<1>>
@enduml
\ No newline at end of file
diff --git a/docs/architecture/diagrams/plantuml/structurizr-Classes_chrislyons_dev_flarelette_jwt__jwks.puml b/docs/architecture/diagrams/plantuml/structurizr-Classes_chrislyons_dev_flarelette_jwt__jwks.puml
index a047d39..3ac3acd 100644
--- a/docs/architecture/diagrams/plantuml/structurizr-Classes_chrislyons_dev_flarelette_jwt__jwks.puml
+++ b/docs/architecture/diagrams/plantuml/structurizr-Classes_chrislyons_dev_flarelette_jwt__jwks.puml
@@ -2,9 +2,9 @@
set separator none
title flarelette-jwt-kit - @chrislyons-dev/flarelette-jwt - Components
-top to bottom direction
-skinparam ranksep 60
-skinparam nodesep 30
+left to right direction
+skinparam ranksep 20
+skinparam nodesep 10
skinparam {
arrowFontSize 10
@@ -17,51 +17,51 @@ skinparam {
hide stereotype
skinparam rectangle<> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
shadowing false
}
skinparam rectangle<> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
shadowing false
}
skinparam rectangle<> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
shadowing false
}
skinparam rectangle<> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
shadowing false
}
skinparam rectangle<> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
shadowing false
}
skinparam rectangle<> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
shadowing false
}
skinparam rectangle<> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
shadowing false
}
diff --git a/docs/architecture/diagrams/plantuml/structurizr-Classes_chrislyons_dev_flarelette_jwt__util-key.puml b/docs/architecture/diagrams/plantuml/structurizr-Classes_chrislyons_dev_flarelette_jwt__util-key.puml
index da75bcd..d2ad682 100644
--- a/docs/architecture/diagrams/plantuml/structurizr-Classes_chrislyons_dev_flarelette_jwt__util-key.puml
+++ b/docs/architecture/diagrams/plantuml/structurizr-Classes_chrislyons_dev_flarelette_jwt__util-key.puml
@@ -18,12 +18,12 @@ skinparam rectangle<<_transparent>> {
}
skinparam rectangle<<1>> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
}
-rectangle "==Component" <<1>>
+rectangle "==Component, Code" <<1>>
@enduml
\ No newline at end of file
diff --git a/docs/architecture/diagrams/plantuml/structurizr-Classes_chrislyons_dev_flarelette_jwt__util.puml b/docs/architecture/diagrams/plantuml/structurizr-Classes_chrislyons_dev_flarelette_jwt__util.puml
index 4cac45f..7d0eba1 100644
--- a/docs/architecture/diagrams/plantuml/structurizr-Classes_chrislyons_dev_flarelette_jwt__util.puml
+++ b/docs/architecture/diagrams/plantuml/structurizr-Classes_chrislyons_dev_flarelette_jwt__util.puml
@@ -2,9 +2,9 @@
set separator none
title flarelette-jwt-kit - @chrislyons-dev/flarelette-jwt - Components
-top to bottom direction
-skinparam ranksep 60
-skinparam nodesep 30
+left to right direction
+skinparam ranksep 20
+skinparam nodesep 10
skinparam {
arrowFontSize 10
@@ -17,72 +17,93 @@ skinparam {
hide stereotype
skinparam rectangle<> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
+ roundCorner 20
+ shadowing false
+}
+skinparam rectangle<> {
+ BackgroundColor #d4e8fc
+ FontColor #000000
+ BorderColor #94a2b0
roundCorner 20
shadowing false
}
skinparam rectangle<> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
shadowing false
}
skinparam rectangle<> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
shadowing false
}
skinparam rectangle<> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
shadowing false
}
skinparam rectangle<> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
shadowing false
}
skinparam rectangle<> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
shadowing false
}
skinparam rectangle<> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
shadowing false
}
skinparam rectangle<> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
shadowing false
}
skinparam rectangle<> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
shadowing false
}
skinparam rectangle<> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
+ FontColor #000000
+ BorderColor #94a2b0
+ roundCorner 20
+ shadowing false
+}
+skinparam rectangle<> {
+ BackgroundColor #d4e8fc
+ FontColor #000000
+ BorderColor #94a2b0
+ roundCorner 20
+ shadowing false
+}
+skinparam rectangle<> {
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
shadowing false
}
@@ -95,6 +116,8 @@ skinparam rectangle<> {
rectangle "@chrislyons-dev/flarelette-jwt\n[Container: Service]" <> {
rectangle "==util.createToken\n[Component: function]\n\nCreate a signed JWT token with optional claims" <> as flarelettejwtkit.chrislyonsdevflarelettejwt.utilcreateToken
rectangle "==util.createDelegatedToken\n[Component: function]\n\nCreate a delegated JWT token following RFC 8693 actor claim pattern Mints a new short-lived token for use within service boundaries where a service acts on behalf of the original end user. This implements zero-trust delegation: - Preserves original user identity (sub) and permissions - Identifies the acting service via 'act' claim - Prevents permission escalation by copying original permissions Pattern: "I'm doing work on behalf of "" <> as flarelettejwtkit.chrislyonsdevflarelettejwt.utilcreateDelegatedToken
+ rectangle "==util.signWithRequestBinding\n[Component: function]\n\nSign a JWT token bound to a specific HTTP request. Adds a `req` claim containing base64url(SHA-256(canonical request)) to prevent replay of a captured token against a different endpoint within the TTL window. Canonical form: METHOD + "\\n" + pathname + search + "\\n" + body bytes" <> as flarelettejwtkit.chrislyonsdevflarelettejwt.utilsignWithRequestBinding
+ rectangle "==util.verifyWithRequestBinding\n[Component: function]\n\nVerify a JWT token and validate its request binding. Re-computes the request hash and compares it with the `req` claim. Returns null on any mismatch (fail-silent, same as verify()). The `req` claim is stripped from the returned payload — it's an implementation detail that has already been validated." <> as flarelettejwtkit.chrislyonsdevflarelettejwt.utilverifyWithRequestBinding
rectangle "==util.checkAuth\n[Component: function]\n\nVerify and authorize a JWT token with policy enforcement" <> as flarelettejwtkit.chrislyonsdevflarelettejwt.utilcheckAuth
rectangle "==util.policy\n[Component: function]\n\nFluent builder for creating authorization policies" <> as flarelettejwtkit.chrislyonsdevflarelettejwt.utilpolicy
rectangle "==util.main\n[Component: function]" <> as flarelettejwtkit.chrislyonsdevflarelettejwt.utilmain
@@ -103,6 +126,7 @@ rectangle "@chrislyons-dev/flarelette-jwt\n[Container: Service]"
rectangle "==util.parse\n[Component: function]\n\nParse a JWT token into header and payload without verification" <> as flarelettejwtkit.chrislyonsdevflarelettejwt.utilparse
rectangle "==util.isExpiringSoon\n[Component: function]\n\nCheck if JWT payload will expire within specified seconds" <> as flarelettejwtkit.chrislyonsdevflarelettejwt.utilisExpiringSoon
rectangle "==util.mapScopesToPermissions\n[Component: function]\n\nMap OAuth scopes to permission strings" <> as flarelettejwtkit.chrislyonsdevflarelettejwt.utilmapScopesToPermissions
+ rectangle "==util.computeRequestHash\n[Component: function]\n\nCompute a deterministic SHA-256 hash that binds a JWT to a specific HTTP request. Canonical form: UTF-8(METHOD + "\\n" + pathname + search + "\\n") || body_bytes - Method is uppercased - Binds to path and query string only (not host/scheme — internal Workers use different hostnames) - Body is consumed from a clone to preserve the original stream" <> as flarelettejwtkit.chrislyonsdevflarelettejwt.utilcomputeRequestHash
}
@enduml
\ No newline at end of file
diff --git a/docs/architecture/diagrams/plantuml/structurizr-Classes_chrislyons_dev_flarelette_jwt__verify-key.puml b/docs/architecture/diagrams/plantuml/structurizr-Classes_chrislyons_dev_flarelette_jwt__verify-key.puml
index da75bcd..d2ad682 100644
--- a/docs/architecture/diagrams/plantuml/structurizr-Classes_chrislyons_dev_flarelette_jwt__verify-key.puml
+++ b/docs/architecture/diagrams/plantuml/structurizr-Classes_chrislyons_dev_flarelette_jwt__verify-key.puml
@@ -18,12 +18,12 @@ skinparam rectangle<<_transparent>> {
}
skinparam rectangle<<1>> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
}
-rectangle "==Component" <<1>>
+rectangle "==Component, Code" <<1>>
@enduml
\ No newline at end of file
diff --git a/docs/architecture/diagrams/plantuml/structurizr-Classes_chrislyons_dev_flarelette_jwt__verify.puml b/docs/architecture/diagrams/plantuml/structurizr-Classes_chrislyons_dev_flarelette_jwt__verify.puml
index 50f4330..9e64577 100644
--- a/docs/architecture/diagrams/plantuml/structurizr-Classes_chrislyons_dev_flarelette_jwt__verify.puml
+++ b/docs/architecture/diagrams/plantuml/structurizr-Classes_chrislyons_dev_flarelette_jwt__verify.puml
@@ -2,9 +2,9 @@
set separator none
title flarelette-jwt-kit - @chrislyons-dev/flarelette-jwt - Components
-top to bottom direction
-skinparam ranksep 60
-skinparam nodesep 30
+left to right direction
+skinparam ranksep 20
+skinparam nodesep 10
skinparam {
arrowFontSize 10
@@ -17,16 +17,16 @@ skinparam {
hide stereotype
skinparam rectangle<> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
shadowing false
}
skinparam rectangle<> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
shadowing false
}
diff --git a/docs/architecture/diagrams/plantuml/structurizr-Classes_flarelette_jwt__adapters-key.puml b/docs/architecture/diagrams/plantuml/structurizr-Classes_flarelette_jwt__adapters-key.puml
index da75bcd..d2ad682 100644
--- a/docs/architecture/diagrams/plantuml/structurizr-Classes_flarelette_jwt__adapters-key.puml
+++ b/docs/architecture/diagrams/plantuml/structurizr-Classes_flarelette_jwt__adapters-key.puml
@@ -18,12 +18,12 @@ skinparam rectangle<<_transparent>> {
}
skinparam rectangle<<1>> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
}
-rectangle "==Component" <<1>>
+rectangle "==Component, Code" <<1>>
@enduml
\ No newline at end of file
diff --git a/docs/architecture/diagrams/plantuml/structurizr-Classes_flarelette_jwt__adapters.puml b/docs/architecture/diagrams/plantuml/structurizr-Classes_flarelette_jwt__adapters.puml
index 46dc8a0..5d9bf9a 100644
--- a/docs/architecture/diagrams/plantuml/structurizr-Classes_flarelette_jwt__adapters.puml
+++ b/docs/architecture/diagrams/plantuml/structurizr-Classes_flarelette_jwt__adapters.puml
@@ -2,9 +2,9 @@
set separator none
title flarelette-jwt-kit - flarelette-jwt - Components
-top to bottom direction
-skinparam ranksep 60
-skinparam nodesep 30
+left to right direction
+skinparam ranksep 20
+skinparam nodesep 10
skinparam {
arrowFontSize 10
@@ -17,9 +17,9 @@ skinparam {
hide stereotype
skinparam rectangle<> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
shadowing false
}
diff --git a/docs/architecture/diagrams/plantuml/structurizr-Classes_flarelette_jwt__explicit-key.puml b/docs/architecture/diagrams/plantuml/structurizr-Classes_flarelette_jwt__explicit-key.puml
index da75bcd..d2ad682 100644
--- a/docs/architecture/diagrams/plantuml/structurizr-Classes_flarelette_jwt__explicit-key.puml
+++ b/docs/architecture/diagrams/plantuml/structurizr-Classes_flarelette_jwt__explicit-key.puml
@@ -18,12 +18,12 @@ skinparam rectangle<<_transparent>> {
}
skinparam rectangle<<1>> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
}
-rectangle "==Component" <<1>>
+rectangle "==Component, Code" <<1>>
@enduml
\ No newline at end of file
diff --git a/docs/architecture/diagrams/plantuml/structurizr-Classes_flarelette_jwt__explicit.puml b/docs/architecture/diagrams/plantuml/structurizr-Classes_flarelette_jwt__explicit.puml
index c5c1724..5091be4 100644
--- a/docs/architecture/diagrams/plantuml/structurizr-Classes_flarelette_jwt__explicit.puml
+++ b/docs/architecture/diagrams/plantuml/structurizr-Classes_flarelette_jwt__explicit.puml
@@ -2,9 +2,9 @@
set separator none
title flarelette-jwt-kit - flarelette-jwt - Components
-top to bottom direction
-skinparam ranksep 60
-skinparam nodesep 30
+left to right direction
+skinparam ranksep 20
+skinparam nodesep 10
skinparam {
arrowFontSize 10
@@ -17,128 +17,219 @@ skinparam {
hide stereotype
skinparam rectangle<> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
shadowing false
}
skinparam rectangle<> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
shadowing false
}
skinparam rectangle<> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
+ roundCorner 20
+ shadowing false
+}
+skinparam rectangle<> {
+ BackgroundColor #d4e8fc
+ FontColor #000000
+ BorderColor #94a2b0
roundCorner 20
shadowing false
}
skinparam rectangle<> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
shadowing false
}
skinparam rectangle<> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
shadowing false
}
skinparam rectangle<> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
+ roundCorner 20
+ shadowing false
+}
+skinparam rectangle<> {
+ BackgroundColor #d4e8fc
+ FontColor #000000
+ BorderColor #94a2b0
roundCorner 20
shadowing false
}
skinparam rectangle<> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
shadowing false
}
skinparam rectangle<> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
shadowing false
}
skinparam rectangle<> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
shadowing false
}
skinparam rectangle<> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
+ FontColor #000000
+ BorderColor #94a2b0
+ roundCorner 20
+ shadowing false
+}
+skinparam rectangle<> {
+ BackgroundColor #d4e8fc
+ FontColor #000000
+ BorderColor #94a2b0
+ roundCorner 20
+ shadowing false
+}
+skinparam rectangle<> {
+ BackgroundColor #d4e8fc
+ FontColor #000000
+ BorderColor #94a2b0
+ roundCorner 20
+ shadowing false
+}
+skinparam rectangle<> {
+ BackgroundColor #d4e8fc
+ FontColor #000000
+ BorderColor #94a2b0
+ roundCorner 20
+ shadowing false
+}
+skinparam rectangle<> {
+ BackgroundColor #d4e8fc
+ FontColor #000000
+ BorderColor #94a2b0
+ roundCorner 20
+ shadowing false
+}
+skinparam rectangle<> {
+ BackgroundColor #d4e8fc
+ FontColor #000000
+ BorderColor #94a2b0
+ roundCorner 20
+ shadowing false
+}
+skinparam rectangle<> {
+ BackgroundColor #d4e8fc
+ FontColor #000000
+ BorderColor #94a2b0
+ roundCorner 20
+ shadowing false
+}
+skinparam rectangle<> {
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
+ roundCorner 20
+ shadowing false
+}
+skinparam rectangle<> {
+ BackgroundColor #d4e8fc
+ FontColor #000000
+ BorderColor #94a2b0
+ roundCorner 20
+ shadowing false
+}
+skinparam rectangle<> {
+ BackgroundColor #d4e8fc
+ FontColor #000000
+ BorderColor #94a2b0
roundCorner 20
shadowing false
}
skinparam rectangle<> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
shadowing false
}
skinparam rectangle<> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
shadowing false
}
skinparam rectangle<> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
shadowing false
}
skinparam rectangle<> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
+ FontColor #000000
+ BorderColor #94a2b0
+ roundCorner 20
+ shadowing false
+}
+skinparam rectangle<> {
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
shadowing false
}
skinparam rectangle<> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
+ FontColor #000000
+ BorderColor #94a2b0
+ roundCorner 20
+ shadowing false
+}
+skinparam rectangle<> {
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
shadowing false
}
skinparam rectangle<> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
shadowing false
}
skinparam rectangle<> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
shadowing false
}
skinparam rectangle<> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
shadowing false
}
@@ -149,14 +240,11 @@ skinparam rectangle<> {
}
rectangle "flarelette-jwt\n[Container: Service]" <> {
- rectangle "==explicit.BaseJwtConfig\n[Component: class]\n\nBase JWT configuration shared by HS512 and EdDSA modes." <> as flarelettejwtkit.flarelettejwt.explicitBaseJwtConfig
- rectangle "==explicit.HS512Config\n[Component: class]\n\nHS512 (HMAC-SHA512) symmetric configuration." <> as flarelettejwtkit.flarelettejwt.explicitHS512Config
- rectangle "==explicit.EdDSASignConfig\n[Component: class]\n\nEdDSA (Ed25519) asymmetric configuration for signing." <> as flarelettejwtkit.flarelettejwt.explicitEdDSASignConfig
- rectangle "==explicit.EdDSAVerifyConfig\n[Component: class]\n\nEdDSA (Ed25519) asymmetric configuration for verification." <> as flarelettejwtkit.flarelettejwt.explicitEdDSAVerifyConfig
- rectangle "==explicit.AuthzOptsWithConfig\n[Component: class]\n\nAuthorization options for check_auth_with_config." <> as flarelettejwtkit.flarelettejwt.explicitAuthzOptsWithConfig
- rectangle "==explicit.AuthUser\n[Component: class]\n\nAuthenticated user information." <> as flarelettejwtkit.flarelettejwt.explicitAuthUser
- rectangle "==explicit._b64url\n[Component: function]\n\nEncode bytes to base64url without padding." <> as flarelettejwtkit.flarelettejwt.explicit_b64url
- rectangle "==explicit._b64url_decode\n[Component: function]\n\nDecode base64url string (with or without padding)." <> as flarelettejwtkit.flarelettejwt.explicit_b64url_decode
+ rectangle "==explicit._find_jwk_by_kid\n[Component: function]" <> as flarelettejwtkit.flarelettejwt.explicit_find_jwk_by_kid
+ rectangle "==explicit._import_verify_key\n[Component: function]" <> as flarelettejwtkit.flarelettejwt.explicit_import_verify_key
+ rectangle "==explicit._has_public_jwk\n[Component: function]" <> as flarelettejwtkit.flarelettejwt.explicit_has_public_jwk
+ rectangle "==explicit._has_jwks_url\n[Component: function]" <> as flarelettejwtkit.flarelettejwt.explicit_has_jwks_url
+ rectangle "==explicit._verify_asymmetric_signature\n[Component: function]" <> as flarelettejwtkit.flarelettejwt.explicit_verify_asymmetric_signature
rectangle "==explicit.sign_with_config\n[Component: function]\n\nSign a JWT token with explicit configuration." <> as flarelettejwtkit.flarelettejwt.explicitsign_with_config
rectangle "==explicit.verify_with_config\n[Component: function]\n\nVerify a JWT token with explicit configuration." <> as flarelettejwtkit.flarelettejwt.explicitverify_with_config
rectangle "==explicit.create_token_with_config\n[Component: function]\n\nCreate a signed JWT token with explicit configuration." <> as flarelettejwtkit.flarelettejwt.explicitcreate_token_with_config
@@ -165,8 +253,24 @@ rectangle "flarelette-jwt\n[Container: Service]" <[Component: function]\n\nHelper function to create HS512 config from base64url-encoded secret." <> as flarelettejwtkit.flarelettejwt.explicitcreate_hs512_config
rectangle "==explicit.create_eddsa_sign_config\n[Component: function]\n\nHelper function to create EdDSA sign config from JWK." <> as flarelettejwtkit.flarelettejwt.explicitcreate_eddsa_sign_config
rectangle "==explicit.create_eddsa_verify_config\n[Component: function]\n\nHelper function to create EdDSA verify config from JWK." <> as flarelettejwtkit.flarelettejwt.explicitcreate_eddsa_verify_config
+ rectangle "==explicit.create_es512_verify_config\n[Component: function]\n\nHelper function to create ES512 verify config from a public JWK." <> as flarelettejwtkit.flarelettejwt.explicitcreate_es512_verify_config
+ rectangle "==explicit.create_jwks_url_verify_config\n[Component: function]\n\nHelper function to create JWKS URL verification config." <> as flarelettejwtkit.flarelettejwt.explicitcreate_jwks_url_verify_config
rectangle "==explicit.SignConfig\n[Component: type]" <> as flarelettejwtkit.flarelettejwt.explicitSignConfig
rectangle "==explicit.VerifyConfig\n[Component: type]" <> as flarelettejwtkit.flarelettejwt.explicitVerifyConfig
+ rectangle "==explicit.BaseJwtConfig\n[Component: class]\n\nBase JWT configuration shared by HS512 and EdDSA modes." <> as flarelettejwtkit.flarelettejwt.explicitBaseJwtConfig
+ rectangle "==explicit.HS512Config\n[Component: class]\n\nHS512 (HMAC-SHA512) symmetric configuration." <> as flarelettejwtkit.flarelettejwt.explicitHS512Config
+ rectangle "==explicit.EdDSASignConfig\n[Component: class]\n\nEdDSA (Ed25519) asymmetric configuration for signing." <> as flarelettejwtkit.flarelettejwt.explicitEdDSASignConfig
+ rectangle "==explicit.EdDSAVerifyConfig\n[Component: class]\n\nEdDSA (Ed25519) asymmetric configuration for verification." <> as flarelettejwtkit.flarelettejwt.explicitEdDSAVerifyConfig
+ rectangle "==explicit.ES512VerifyConfig\n[Component: class]\n\nES512 (ECDSA P-521) asymmetric configuration for verification." <> as flarelettejwtkit.flarelettejwt.explicitES512VerifyConfig
+ rectangle "==explicit.JWKSUrlVerifyConfig\n[Component: class]\n\nAsymmetric verification configuration backed by a remote JWKS URL." <> as flarelettejwtkit.flarelettejwt.explicitJWKSUrlVerifyConfig
+ rectangle "==explicit.AuthzOptsWithConfig\n[Component: class]\n\nAuthorization options for check_auth_with_config." <> as flarelettejwtkit.flarelettejwt.explicitAuthzOptsWithConfig
+ rectangle "==explicit.AuthUser\n[Component: class]\n\nAuthenticated user information." <> as flarelettejwtkit.flarelettejwt.explicitAuthUser
+ rectangle "==explicit._b64url\n[Component: function]\n\nEncode bytes to base64url without padding." <> as flarelettejwtkit.flarelettejwt.explicit_b64url
+ rectangle "==explicit._b64url_decode\n[Component: function]\n\nDecode base64url string (with or without padding)." <> as flarelettejwtkit.flarelettejwt.explicit_b64url_decode
+ rectangle "==explicit._validate_jwks_url\n[Component: function]" <> as flarelettejwtkit.flarelettejwt.explicit_validate_jwks_url
+ rectangle "==explicit._ecdsa_curve_name\n[Component: function]" <> as flarelettejwtkit.flarelettejwt.explicit_ecdsa_curve_name
+ rectangle "==explicit._hash_name\n[Component: function]" <> as flarelettejwtkit.flarelettejwt.explicit_hash_name
+ rectangle "==explicit._fetch_jwks_from_url\n[Component: function]" <> as flarelettejwtkit.flarelettejwt.explicit_fetch_jwks_from_url
}
@enduml
\ No newline at end of file
diff --git a/docs/architecture/diagrams/plantuml/structurizr-Classes_flarelette_jwt__util-key.puml b/docs/architecture/diagrams/plantuml/structurizr-Classes_flarelette_jwt__util-key.puml
index da75bcd..d2ad682 100644
--- a/docs/architecture/diagrams/plantuml/structurizr-Classes_flarelette_jwt__util-key.puml
+++ b/docs/architecture/diagrams/plantuml/structurizr-Classes_flarelette_jwt__util-key.puml
@@ -18,12 +18,12 @@ skinparam rectangle<<_transparent>> {
}
skinparam rectangle<<1>> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
}
-rectangle "==Component" <<1>>
+rectangle "==Component, Code" <<1>>
@enduml
\ No newline at end of file
diff --git a/docs/architecture/diagrams/plantuml/structurizr-Classes_flarelette_jwt__util.puml b/docs/architecture/diagrams/plantuml/structurizr-Classes_flarelette_jwt__util.puml
index 64ba91f..1a4646e 100644
--- a/docs/architecture/diagrams/plantuml/structurizr-Classes_flarelette_jwt__util.puml
+++ b/docs/architecture/diagrams/plantuml/structurizr-Classes_flarelette_jwt__util.puml
@@ -2,9 +2,9 @@
set separator none
title flarelette-jwt-kit - flarelette-jwt - Components
-top to bottom direction
-skinparam ranksep 60
-skinparam nodesep 30
+left to right direction
+skinparam ranksep 20
+skinparam nodesep 10
skinparam {
arrowFontSize 10
@@ -17,324 +17,331 @@ skinparam {
hide stereotype
skinparam rectangle<> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
shadowing false
}
skinparam rectangle<> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
shadowing false
}
skinparam rectangle<> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
shadowing false
}
skinparam rectangle<> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
shadowing false
}
skinparam rectangle<> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
shadowing false
}
skinparam rectangle<> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
shadowing false
}
skinparam rectangle<> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
shadowing false
}
skinparam rectangle<> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
shadowing false
}
skinparam rectangle<> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
shadowing false
}
skinparam rectangle<> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
shadowing false
}
skinparam rectangle<> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
shadowing false
}
skinparam rectangle<> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
shadowing false
}
skinparam rectangle<> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
shadowing false
}
skinparam rectangle<> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
shadowing false
}
skinparam rectangle<> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
shadowing false
}
skinparam rectangle<> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
shadowing false
}
skinparam rectangle<> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
shadowing false
}
skinparam rectangle<> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
shadowing false
}
skinparam rectangle<> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
shadowing false
}
skinparam rectangle<> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
shadowing false
}
skinparam rectangle<> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
shadowing false
}
skinparam rectangle<> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
shadowing false
}
skinparam rectangle<> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
shadowing false
}
skinparam rectangle<> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
shadowing false
}
skinparam rectangle<> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
shadowing false
}
skinparam rectangle<> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
shadowing false
}
skinparam rectangle<> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
shadowing false
}
skinparam rectangle<> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
shadowing false
}
skinparam rectangle<> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
shadowing false
}
skinparam rectangle<> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
shadowing false
}
skinparam rectangle<> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
shadowing false
}
skinparam rectangle<> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
shadowing false
}
skinparam rectangle<> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
shadowing false
}
skinparam rectangle<> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
shadowing false
}
skinparam rectangle<> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
+ roundCorner 20
+ shadowing false
+}
+skinparam rectangle<> {
+ BackgroundColor #d4e8fc
+ FontColor #000000
+ BorderColor #94a2b0
roundCorner 20
shadowing false
}
skinparam rectangle<> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
shadowing false
}
skinparam rectangle<> {
- BackgroundColor #85bbf0
+ BackgroundColor #d4e8fc
FontColor #000000
- BorderColor #5d82a8
+ BorderColor #94a2b0
roundCorner 20
shadowing false
}
skinparam rectangle<