@openfn/ws-worker 1.13.5 → 1.13.6

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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # ws-worker
2
2
 
3
+ ## 1.13.6
4
+
5
+ ### Patch Changes
6
+
7
+ - 284d10a: Add 5s of clock tolerance to run token validation
8
+
3
9
  ## 1.13.5
4
10
 
5
11
  ### Patch Changes
package/dist/index.js CHANGED
@@ -118,7 +118,9 @@ var mockLogger = createMockLogger();
118
118
  var verifyToken = async (token, publicKey) => {
119
119
  const key = crypto.createPublicKey(publicKey);
120
120
  const { payload } = await jose.jwtVerify(token, key, {
121
- issuer: "Lightning"
121
+ issuer: "Lightning",
122
+ clockTolerance: "5s"
123
+ // Allow 5 seconds of clock skew
122
124
  });
123
125
  if (payload) {
124
126
  return true;
package/dist/start.js CHANGED
@@ -258,7 +258,9 @@ var mockLogger = createMockLogger();
258
258
  var verifyToken = async (token, publicKey) => {
259
259
  const key = crypto2.createPublicKey(publicKey);
260
260
  const { payload } = await jose.jwtVerify(token, key, {
261
- issuer: "Lightning"
261
+ issuer: "Lightning",
262
+ clockTolerance: "5s"
263
+ // Allow 5 seconds of clock skew
262
264
  });
263
265
  if (payload) {
264
266
  return true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfn/ws-worker",
3
- "version": "1.13.5",
3
+ "version": "1.13.6",
4
4
  "description": "A Websocket Worker to connect Lightning to a Runtime Engine",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -24,9 +24,9 @@
24
24
  "phoenix": "1.7.10",
25
25
  "ws": "^8.18.0",
26
26
  "@openfn/engine-multi": "1.6.6",
27
+ "@openfn/lexicon": "^1.2.2",
27
28
  "@openfn/logger": "1.0.5",
28
- "@openfn/runtime": "1.6.4",
29
- "@openfn/lexicon": "^1.2.2"
29
+ "@openfn/runtime": "1.6.4"
30
30
  },
31
31
  "devDependencies": {
32
32
  "@types/koa": "^2.13.5",
@@ -43,7 +43,7 @@
43
43
  "tsup": "^6.2.3",
44
44
  "typescript": "^4.6.4",
45
45
  "yargs": "^17.6.2",
46
- "@openfn/lightning-mock": "2.1.8"
46
+ "@openfn/lightning-mock": "2.1.9"
47
47
  },
48
48
  "files": [
49
49
  "dist",