/Wiki/sources/honojs__hono/2026/https-hono-dev-llms-full-txt-what-this-middlewar-8c5fc4d19bd4-what-this-middleware-validates-s0319-c0000.md

What this middleware validates (1) - hono-docs

What this middleware validates (1) Source evidence: /Sources/raw/honojs hono/honojs hono.md Canonical citation: https://hono.dev/llms full.txt what this midd...

What this middleware validates (1)

Source evidence: /Sources/raw/honojshono/honojshono.md Canonical citation: https://hono.dev/llms-full.txt#what-this-middleware-validates

Summary

For each token, jwk(): - Parses and validates the JWT header format. - Requires a kid header and finds a matching key by kid. - Rejects symmetric algorithms (HS256, HS384, HS512). - Requires the header alg to be included in...

Content

For each token, jwk():

  • Parses and validates the JWT header format.
  • Requires a kid header and finds a matching key by kid.
  • Rejects symmetric algorithms (HS256, HS384, HS512).
  • Requires the header alg to be included in the configured alg allowlist.
  • If a matched JWK has an alg field, requires it to match the JWT header alg.
  • Verifies the token signature with the matched key.
  • By default, validates time-based claims: nbf, exp, and iat.

Optional claim validation can be configured with the verification option:

  • iss: validates issuer when provided.
  • aud: validates audience when provided.

If you need additional token checks beyond the above (for example, custom application-level authorization rules), add them in your own middleware after jwk().

:::info The Authorization header sent from the client must have a specified scheme.

Kinic Wiki
Loading knowledge node
Details

Identity

database
db_23dhmsxlhukv
database_id
db_23dhmsxlhukv
path
/Wiki/sources/honojs__hono/2026/https-hono-dev-llms-full-txt-what-this-middlewar-8c5fc4d19bd4-what-this-middleware-validates-s0319-c0000.md
kind
directory
role
markdown_note
children
0

Metadata

created_at
virtual
updated_at
virtual
etag
virtual
metadata_json
{}

Lint Hints

No lightweight warnings.

Outgoing Links

No outgoing links indexed.

Incoming Links

Select a file node to inspect backlinks.

Raw Source

No raw source path inferred.