98 lines
3.7 KiB
JSON
98 lines
3.7 KiB
JSON
{
|
|
"name": "@suaveplan/api-auth-jwt",
|
|
"version": "0.1.0",
|
|
"type": "module",
|
|
"sideEffects": false,
|
|
"description": "Stage-4 concrete JWT session resolver for @suaveplan/api-auth. Verifies a JWT presented on the Authorization header (or a configurable cookie) using @suaveplan/jws against either a JWKS endpoint (TTL + negative-cache + in-flight dedup) or a single static JsonWebKey; projects validated claims onto a Principal via an overridable mapper. Returns null on parse/verify failure (chain semantics) and contributes a Bearer JWT OpenAPI security scheme.",
|
|
"license": "MIT",
|
|
"author": "Suaveplan Team",
|
|
"main": "./dist/index.js",
|
|
"module": "./dist/index.js",
|
|
"types": "./dist/index.d.ts",
|
|
"exports": {
|
|
"./package.json": "./package.json",
|
|
".": {
|
|
"import": {
|
|
"types": "./dist/index.d.ts",
|
|
"default": "./dist/index.js"
|
|
},
|
|
"require": {
|
|
"types": "./dist/index.d.ts",
|
|
"default": "./dist/index.js"
|
|
}
|
|
},
|
|
"./resolver": {
|
|
"import": {
|
|
"types": "./dist/resolver/resolver.d.ts",
|
|
"default": "./dist/resolver/resolver.js"
|
|
}
|
|
},
|
|
"./jwks-cache": {
|
|
"import": {
|
|
"types": "./dist/jwks-cache/jwks-cache.d.ts",
|
|
"default": "./dist/jwks-cache/jwks-cache.js"
|
|
}
|
|
},
|
|
"./claims-mapper": {
|
|
"import": {
|
|
"types": "./dist/claims-mapper/claims-mapper.d.ts",
|
|
"default": "./dist/claims-mapper/claims-mapper.js"
|
|
}
|
|
},
|
|
"./security-scheme": {
|
|
"import": {
|
|
"types": "./dist/security-scheme/security-scheme.d.ts",
|
|
"default": "./dist/security-scheme/security-scheme.js"
|
|
}
|
|
},
|
|
"./error-codes": {
|
|
"import": {
|
|
"types": "./dist/error-codes/error-codes.d.ts",
|
|
"default": "./dist/error-codes/error-codes.js"
|
|
}
|
|
},
|
|
"./options": {
|
|
"import": {
|
|
"types": "./dist/options/options.d.ts",
|
|
"default": "./dist/options/options.js"
|
|
}
|
|
}
|
|
},
|
|
"scripts": {
|
|
"build": "vite build",
|
|
"test": "vitest run --passWithNoTests",
|
|
"test:watch": "vitest",
|
|
"test:coverage": "vitest run --coverage --passWithNoTests",
|
|
"lint": "bunx biome check src/",
|
|
"lint:fix": "bunx biome lint --fix --unsafe --max-diagnostics 500 src/",
|
|
"format": "bunx biome format --write --max-diagnostics 500 src/",
|
|
"check": "bunx biome check --write --unsafe --max-diagnostics 500 src/",
|
|
"typecheck": "bunx tsc --noEmit --composite false -p tsconfig.lib.json",
|
|
"docs:check": "bun run ../../../../scripts/docs-check.ts ."
|
|
},
|
|
"dependencies": {
|
|
"@suaveplan/api-auth": "workspace:^",
|
|
"@suaveplan/api-types": "workspace:^",
|
|
"@suaveplan/error": "workspace:^",
|
|
"@suaveplan/jws": "workspace:^",
|
|
"@suaveplan/types": "workspace:^",
|
|
"tslib": "catalog:build",
|
|
"zod": "catalog:forms"
|
|
},
|
|
"devDependencies": {
|
|
"@suaveplan/crypto-rsa": "workspace:^",
|
|
"@suaveplan/testing": "workspace:^",
|
|
"@types/node": "catalog:",
|
|
"@vitest/coverage-istanbul": "catalog:testing",
|
|
"typescript": "catalog:",
|
|
"vite": "catalog:build",
|
|
"vite-plugin-dts": "catalog:build",
|
|
"vitest": "catalog:testing"
|
|
},
|
|
"publishConfig": {
|
|
"registry": "https://npmjs.fq.io/",
|
|
"access": "public"
|
|
},
|
|
"files": ["dist", "src", "README.md"]
|
|
}
|