@t4h.framework/webhook 0.2.0 → 0.2.1

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,30 @@
1
1
  # @t4h.framework/webhook
2
2
 
3
+ ## 0.2.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#170](https://github.com/tech4humans-brasil/framework/pull/170) [`aa72268`](https://github.com/tech4humans-brasil/framework/commit/aa72268d040a743743cac31cc14e26b8620b0e3f) Thanks [@gusteycamargo](https://github.com/gusteycamargo)! - Adds the `jwks` callback auth: a detached signature over the callback body,
8
+ verified with the public key the `kid` resolves to at a JWKS URL — the way Amber
9
+ signs its webhooks.
10
+
11
+ **core**: `AsyncActivityCallbackAuthJwks` joins `AsyncActivityCallbackAuth`
12
+ (`jwksUri`, `header`, `kid`/`kidHeader`, `algorithm`/`algorithmHeader`,
13
+ `signatureFormat`/`signatureFormatHeader`, `timestampHeader`,
14
+ `toleranceInSeconds`, `signedPayload` as a template over `{timestamp}` and
15
+ `{body}`).
16
+
17
+ **jwks**: `jwksCallback` (default of `@t4h.framework/jwks/callback`) now serves
18
+ both `jwt` and `jwks`. Hosts pass it as `{ jwt: jwksCallback, jwks: jwksCallback }`.
19
+
20
+ **dev**: loads `@t4h.framework/jwks` for the `jwks` type as well.
21
+
22
+ **webhook**: documents the new type.
23
+
24
+ - Updated dependencies [[`aa72268`](https://github.com/tech4humans-brasil/framework/commit/aa72268d040a743743cac31cc14e26b8620b0e3f)]:
25
+ - @t4h.framework/core@0.14.0
26
+ - @t4h.framework/http@0.6.3
27
+
3
28
  ## 0.2.0
4
29
 
5
30
  ### Minor Changes
package/README.md CHANGED
@@ -32,7 +32,8 @@ arrives before `timeoutInMs` throws `WebhookTimeoutError`, so the workflow
32
32
  never sees a callback that did not happen.
33
33
 
34
34
  Supported `auth`: `hmac` (GitHub, Shopify, Slack style), `basic`, `header`,
35
- `bearer` and `jwt` (JWKS).
35
+ `bearer`, `jwt` (bearer JWT verified with a JWKS) and `jwks` (detached
36
+ signature verified with a JWKS key).
36
37
 
37
38
  Pass `{ wait: false }` as the second argument to send the request without
38
39
  suspending; you get a handle and call `handle.wait()` later.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@t4h.framework/webhook",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Webhook module for the T4H Framework",
5
5
  "homepage": "https://github.com/tech4humans-brasil/framework/tree/main/packages/webhook",
6
6
  "bugs": "https://github.com/tech4humans-brasil/framework/issues",
@@ -34,14 +34,14 @@
34
34
  "typebox": "^1.1.6"
35
35
  },
36
36
  "devDependencies": {
37
- "@t4h.framework/core": "^0.13.0",
38
- "@t4h.framework/http": "^0.6.2",
37
+ "@t4h.framework/core": "^0.14.0",
38
+ "@t4h.framework/http": "^0.6.3",
39
39
  "typescript": "^5.9.3",
40
40
  "vitest": "^4.0.18"
41
41
  },
42
42
  "peerDependencies": {
43
- "@t4h.framework/core": "^0.13.0",
44
- "@t4h.framework/http": "^0.6.2"
43
+ "@t4h.framework/core": "^0.14.0",
44
+ "@t4h.framework/http": "^0.6.3"
45
45
  },
46
46
  "packageManager": "yarn@4.12.0",
47
47
  "engines": {