@getstrata/core 2.2.30 → 2.2.31
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 +4 -0
- package/dist/entries/auth/jwt.js +3 -3
- package/dist/entries/auth/jwtGuard.js +3 -3
- package/dist/index.js +3 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# @getstrata/core changelog
|
|
2
2
|
|
|
3
|
+
## 2.2.31
|
|
4
|
+
|
|
5
|
+
Preserve JWT issuance precision across millisecond revocation cutoffs without changing expiration. Generated MFA setup rejects stale concurrent state changes and atomically commits credential revocation in SQLite/non-RLS as well as Postgres RLS. Adds real HTTP initial/replacement races, revocation rollback and withheld-success recovery regressions; intentional fresh replacement remains supported.
|
|
6
|
+
|
|
3
7
|
## 2.2.30
|
|
4
8
|
|
|
5
9
|
Basic authentication resolution is reused only within the same Request and unchanged credentials, preventing middleware/controller lookups from consuming MFA recovery proofs twice. Adds real HTTP replay/concurrency and credential/guard invalidation regressions.
|
package/dist/entries/auth/jwt.js
CHANGED
|
@@ -124,11 +124,11 @@ function signaturesMatch(left, right) {
|
|
|
124
124
|
return timingSafeEqual(leftBuffer, rightBuffer);
|
|
125
125
|
}
|
|
126
126
|
function signJwt(payload, options = {}) {
|
|
127
|
-
const
|
|
127
|
+
const issuedAt = Date.now() / 1000;
|
|
128
128
|
const body = {
|
|
129
129
|
...payload,
|
|
130
|
-
iat:
|
|
131
|
-
exp:
|
|
130
|
+
iat: issuedAt,
|
|
131
|
+
exp: Math.floor(issuedAt) + jwtTtlSeconds(options.ttlSeconds)
|
|
132
132
|
};
|
|
133
133
|
const header = encodeJson({ alg: "HS256", typ: "JWT" });
|
|
134
134
|
const data = encodeJson(body);
|
|
@@ -292,11 +292,11 @@ function signaturesMatch(left, right) {
|
|
|
292
292
|
return timingSafeEqual(leftBuffer, rightBuffer);
|
|
293
293
|
}
|
|
294
294
|
function signJwt(payload, options = {}) {
|
|
295
|
-
const
|
|
295
|
+
const issuedAt = Date.now() / 1000;
|
|
296
296
|
const body = {
|
|
297
297
|
...payload,
|
|
298
|
-
iat:
|
|
299
|
-
exp:
|
|
298
|
+
iat: issuedAt,
|
|
299
|
+
exp: Math.floor(issuedAt) + jwtTtlSeconds(options.ttlSeconds)
|
|
300
300
|
};
|
|
301
301
|
const header = encodeJson({ alg: "HS256", typ: "JWT" });
|
|
302
302
|
const data = encodeJson(body);
|
package/dist/index.js
CHANGED
|
@@ -1920,11 +1920,11 @@ function signaturesMatch(left, right) {
|
|
|
1920
1920
|
return timingSafeEqual2(leftBuffer, rightBuffer);
|
|
1921
1921
|
}
|
|
1922
1922
|
function signJwt(payload, options = {}) {
|
|
1923
|
-
const
|
|
1923
|
+
const issuedAt = Date.now() / 1000;
|
|
1924
1924
|
const body = {
|
|
1925
1925
|
...payload,
|
|
1926
|
-
iat:
|
|
1927
|
-
exp:
|
|
1926
|
+
iat: issuedAt,
|
|
1927
|
+
exp: Math.floor(issuedAt) + jwtTtlSeconds(options.ttlSeconds)
|
|
1928
1928
|
};
|
|
1929
1929
|
const header = encodeJson({ alg: "HS256", typ: "JWT" });
|
|
1930
1930
|
const data = encodeJson(body);
|