Expand description
JWT authentication plugin (jwt-auth).
Validates HMAC-signed JWTs (HS256/HS384/HS512) taken from a configurable
header, enforcing expiry, and exposes the verified claims to downstream
nodes via context.message. Invalid or missing tokens are rejected with a
401 error routed through the node’s error port.
Two modes, usable together:
- inline secret (
secretset): every token is verified with one shared secret and algorithm, exactly as before. - consumer mode (
use_consumers: true): the token’skeyclaim identifies a consumer; the token is then verified with that consumer’sjwt-auth: {key, secret, algorithm}credential and, on success, the consumer’s identity is attached to the request.
Structs§
- JwtAuth
Plugin - Authenticates requests by verifying a JWT signature and expiry (
exp).
Functions§
- parse_
algorithm 🔒 - Parses a supported HMAC algorithm name, defaulting to HS256 when absent.