update
This commit is contained in:
1 parent
54bcc77ef7
commit
7a3db27ffa
33 files changed
+5906
-3089
No files matched your search
@@ -1,13 +1,7 @@
|
||||
import { createHmac, randomBytes, timingSafeEqual } from "node:crypto";
|
||||
|
||||
/**
|
||||
* Lightweight HMAC-based agent token system.
|
||||
* Tokens are short-lived and scoped to a specific agent + company + run.
|
||||
* No external JWT library needed.
|
||||
*/
|
||||
|
||||
const SIGNING_KEY = randomBytes(32);
|
||||
const TOKEN_TTL_MS = 12 * 60 * 60 * 1000; // 12 hours
|
||||
const TOKEN_TTL_MS = 48 * 60 * 60 * 1000; // 48 hours
|
||||
|
||||
interface TokenPayload {
|
||||
agentId: string;
|
||||
|
||||
Reference in new issue
Block a user