Layer to validate incoming JWTs.
If verification succeeds, the decoded JWT is stored in the request's extensions under the JWT key.
See JwtConfig for configuration.
import {jwtLayer} from "@taxum/jwt";import {m, Router} from "@taxum/core/routing";const router = new Router() .route("/" m.get(() => "I'm protected!")) .layer(jwtLayer({ key: new Uint8Array(), )); Copy
import {jwtLayer} from "@taxum/jwt";import {m, Router} from "@taxum/core/routing";const router = new Router() .route("/" m.get(() => "I'm protected!")) .layer(jwtLayer({ key: new Uint8Array(), ));
Layer to validate incoming JWTs.
If verification succeeds, the decoded JWT is stored in the request's extensions under the JWT key.
See JwtConfig for configuration.