MCPcopy Create free account
hub / github.com/codeaashu/claude-code / constructor

Method constructor

src/server/web/auth/adapter.ts:84–93  ·  view source on GitHub ↗
(secret: string)

Source from the content-addressed store, hash-verified

82 private readonly key: Buffer;
83
84 constructor(secret: string) {
85 // Derive a stable 32-byte key so the same secret always produces the
86 // same key (important if the process restarts while cookies are live).
87 const hmac = createHmac("sha256", secret);
88 hmac.update("cc-session-key-v1");
89 this.key = hmac.digest();
90
91 // Purge expired sessions every 5 minutes.
92 setInterval(() => this.cleanup(), 5 * 60_000).unref();
93 }
94
95 // ── CRUD ──────────────────────────────────────────────────────────────────
96

Callers

nothing calls this directly

Calls 2

cleanupMethod · 0.95
updateMethod · 0.65

Tested by

no test coverage detected