@orangecheck/me-client 0.53.2 → 0.53.4
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 +15 -0
- package/dist/index.js +8 -8
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -8
- package/dist/index.mjs.map +1 -1
- package/dist/server.js +4 -4
- package/dist/server.js.map +1 -1
- package/dist/server.mjs +4 -4
- package/dist/server.mjs.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,21 @@ and [Semantic Versioning](https://semver.org/). Wire-format / canonical-message
|
|
|
8
8
|
changes are coordinated via the relevant `oc-*-protocol` spec repo's CHANGELOG;
|
|
9
9
|
this file tracks the package's TS / Node / runtime API surface.
|
|
10
10
|
|
|
11
|
+
## [0.53.4] — 2026-10-26
|
|
12
|
+
|
|
13
|
+
### Changed
|
|
14
|
+
|
|
15
|
+
- Depends on `@orangecheck/auth-core` ^2.26.1, so the session checks it runs
|
|
16
|
+
through auth-core look a `kid` up the same way as 0.53.3's own verifiers.
|
|
17
|
+
|
|
18
|
+
## [0.53.3] — 2026-10-26
|
|
19
|
+
|
|
20
|
+
### Fixed
|
|
21
|
+
|
|
22
|
+
- The webhook verifier and `verifyActivityAttestation` look a `kid` up only
|
|
23
|
+
among the fetched key set's own entries. Any string is a usable `kid`, and a
|
|
24
|
+
`kid` that names no key in the set is refused.
|
|
25
|
+
|
|
11
26
|
## [0.53.2] — 2026-10-26
|
|
12
27
|
|
|
13
28
|
### Fixed
|
package/dist/index.js
CHANGED
|
@@ -995,11 +995,11 @@ async function fetchJwks(issuer, ttlMs, maxStaleMs = DEFAULT_MAX_STALE_MS) {
|
|
|
995
995
|
if (!json || !Array.isArray(json.keys)) {
|
|
996
996
|
throw new Error(`JWKS at ${url} did not return {keys:[\u2026]}`);
|
|
997
997
|
}
|
|
998
|
-
const keys =
|
|
998
|
+
const keys = /* @__PURE__ */ new Map();
|
|
999
999
|
for (const k of json.keys) {
|
|
1000
1000
|
if (typeof k.kid !== "string") continue;
|
|
1001
1001
|
try {
|
|
1002
|
-
keys
|
|
1002
|
+
keys.set(k.kid, await importJWK(k, "EdDSA"));
|
|
1003
1003
|
} catch {
|
|
1004
1004
|
}
|
|
1005
1005
|
}
|
|
@@ -1074,11 +1074,11 @@ async function verify2(rawBody, sigHex, kid, options = {}) {
|
|
|
1074
1074
|
const maxStale = options.jwksMaxStaleMs ?? DEFAULT_MAX_STALE_MS;
|
|
1075
1075
|
try {
|
|
1076
1076
|
let entry = await fetchJwks(issuer, ttl, maxStale);
|
|
1077
|
-
key = entry.keys
|
|
1077
|
+
key = entry.keys.get(kid);
|
|
1078
1078
|
if (!key && Date.now() - (lastForcedRefresh.get(issuer) ?? 0) >= FORCED_REFRESH_MIN_INTERVAL_MS) {
|
|
1079
1079
|
lastForcedRefresh.set(issuer, Date.now());
|
|
1080
1080
|
entry = await fetchJwks(issuer, 0, maxStale);
|
|
1081
|
-
key = entry.keys
|
|
1081
|
+
key = entry.keys.get(kid);
|
|
1082
1082
|
}
|
|
1083
1083
|
} catch (err) {
|
|
1084
1084
|
return { ok: false, reason: `jwks unavailable: ${err.message}` };
|
|
@@ -1267,11 +1267,11 @@ async function fetchEnvelopeJwks(issuer, ttlMs, maxStaleMs = DEFAULT_MAX_STALE_M
|
|
|
1267
1267
|
if (!json || !Array.isArray(json.keys)) {
|
|
1268
1268
|
throw new Error(`envelope JWKS at ${url} did not return {keys:[\u2026]}`);
|
|
1269
1269
|
}
|
|
1270
|
-
const keys =
|
|
1270
|
+
const keys = /* @__PURE__ */ new Map();
|
|
1271
1271
|
for (const k of json.keys) {
|
|
1272
1272
|
if (typeof k.kid !== "string") continue;
|
|
1273
1273
|
try {
|
|
1274
|
-
keys
|
|
1274
|
+
keys.set(k.kid, await importJWK(k, "EdDSA"));
|
|
1275
1275
|
} catch {
|
|
1276
1276
|
}
|
|
1277
1277
|
}
|
|
@@ -1449,11 +1449,11 @@ async function verifyActivityAttestation(bundle, options = {}) {
|
|
|
1449
1449
|
const maxStale = options.jwksMaxStaleMs ?? DEFAULT_MAX_STALE_MS2;
|
|
1450
1450
|
try {
|
|
1451
1451
|
let entry = await fetchEnvelopeJwks(issuer, ttl, maxStale);
|
|
1452
|
-
key = entry.keys
|
|
1452
|
+
key = entry.keys.get(bundle.kid) ?? null;
|
|
1453
1453
|
if (!key && Date.now() - (lastForcedRefresh2.get(issuer) ?? 0) >= FORCED_REFRESH_MIN_INTERVAL_MS2) {
|
|
1454
1454
|
lastForcedRefresh2.set(issuer, Date.now());
|
|
1455
1455
|
entry = await fetchEnvelopeJwks(issuer, 0, maxStale);
|
|
1456
|
-
key = entry.keys
|
|
1456
|
+
key = entry.keys.get(bundle.kid) ?? null;
|
|
1457
1457
|
}
|
|
1458
1458
|
checks.push({
|
|
1459
1459
|
ok: !!key,
|