openclaw/docs/automation
Bradley Priest 45b41672c6 feat(hooks): support custom verifyAuth in transform modules
Add ability for hook mapping transform modules to export a verifyAuth
function for custom webhook authentication (e.g., GitHub HMAC signatures).

When a mapping's transform exports verifyAuth, it replaces standard
token auth for that mapping. Returns true to allow, false to reject.

Flow in server-http.ts:
1. Read raw body + parse JSON
2. findMapping() to match on path/source
3. authenticateHook() with matched transform
4. Route: wake / agent / applyMapping()

Changes:
- hooks.ts: Split readJsonBody into readRawBody + parseJsonBody;
  add authenticateHook() for custom or token auth
- hooks-mapping.ts: Add verifyAuth types, loadVerifyAuth(),
  findMapping(), applyMapping(); CachedTransform for caching
- server-http.ts: Linear flow using the above
- Tests for authenticateHook and loadVerifyAuth
- Document verifyAuth with GitHub HMAC example
2026-01-29 19:35:48 -08:00
..
auth-monitoring.md refactor: rename clawdbot to moltbot with legacy compat 2026-01-27 12:21:02 +00:00
cron-jobs.md refactor: rename clawdbot to moltbot with legacy compat 2026-01-27 12:21:02 +00:00
cron-vs-heartbeat.md refactor: rename clawdbot to moltbot with legacy compat 2026-01-27 12:21:02 +00:00
gmail-pubsub.md refactor: rename clawdbot to moltbot with legacy compat 2026-01-27 12:21:02 +00:00
poll.md refactor: rename clawdbot to moltbot with legacy compat 2026-01-27 12:21:02 +00:00
webhook.md feat(hooks): support custom verifyAuth in transform modules 2026-01-29 19:35:48 -08:00