@exortek/apikey 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +42 -32
- package/dist/index.cjs +22 -12
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +22 -12
- package/dist/middleware/core.d.ts +2 -2
- package/dist/middleware/express.cjs +22 -12
- package/dist/middleware/express.mjs +22 -12
- package/dist/middleware/fastify.cjs +109 -48
- package/dist/middleware/fastify.d.ts +1 -1
- package/dist/middleware/fastify.mjs +109 -48
- package/dist/stores.cjs +539 -325
- package/dist/stores.mjs +539 -325
- package/dist/token.d.ts +3 -3
- package/package.json +3 -12
package/dist/token.d.ts
CHANGED
|
@@ -30,9 +30,9 @@ export function mint(prefix: string, pepper: Buffer | null): {
|
|
|
30
30
|
export function hashSecret(secretBytes: Buffer, pepper: Buffer | null): string;
|
|
31
31
|
/**
|
|
32
32
|
* Timing-safe compare of a candidate hash against a stored hash. Both
|
|
33
|
-
* inputs are base64url strings
|
|
34
|
-
*
|
|
35
|
-
*
|
|
33
|
+
* inputs are base64url strings. A length mismatch early-returns `false`
|
|
34
|
+
* — all stored hashes are fixed-length (43-char SHA-256 digests), so
|
|
35
|
+
* the length check leaks no information about the stored value.
|
|
36
36
|
*
|
|
37
37
|
* @param {string} candidate
|
|
38
38
|
* @param {string} stored
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exortek/apikey",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Stripe-style prefixed API keys for Node.js — 3-segment tokens (prefix_id_secret), HMAC-SHA256 storage hash with pepper rotation, scope allowlists with wildcard match, opt-in lastUsedAt tracking, memory + Redis stores, Express + Fastify middleware. Server-only. Zero non-@exortek runtime dependencies.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
"files": [
|
|
33
33
|
"dist",
|
|
34
34
|
"README.md",
|
|
35
|
+
"CHANGELOG.md",
|
|
35
36
|
"LICENSE"
|
|
36
37
|
],
|
|
37
38
|
"scripts": {
|
|
@@ -72,8 +73,7 @@
|
|
|
72
73
|
},
|
|
73
74
|
"peerDependencies": {
|
|
74
75
|
"express": ">=4",
|
|
75
|
-
"fastify": ">=4"
|
|
76
|
-
"fastify-plugin": ">=4"
|
|
76
|
+
"fastify": ">=4"
|
|
77
77
|
},
|
|
78
78
|
"peerDependenciesMeta": {
|
|
79
79
|
"express": {
|
|
@@ -81,17 +81,8 @@
|
|
|
81
81
|
},
|
|
82
82
|
"fastify": {
|
|
83
83
|
"optional": true
|
|
84
|
-
},
|
|
85
|
-
"fastify-plugin": {
|
|
86
|
-
"optional": true
|
|
87
84
|
}
|
|
88
85
|
},
|
|
89
|
-
"devDependencies": {
|
|
90
|
-
"@exortek/shared": "0.0.0",
|
|
91
|
-
"express": "^5.2.1",
|
|
92
|
-
"fastify": "^5.10.0",
|
|
93
|
-
"fastify-plugin": "^6.0.0"
|
|
94
|
-
},
|
|
95
86
|
"publishConfig": {
|
|
96
87
|
"access": "public"
|
|
97
88
|
}
|