MCPcopy Create free account
hub / github.com/MemTensor/MemOS / createSession

Method createSession

packages/memos-core/src/viewer/server.ts:265–269  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

263 }
264
265 private createSession(): string {
266 const token = crypto.randomBytes(32).toString("hex");
267 this.auth.sessions.set(token, Date.now() + ViewerServer.SESSION_TTL);
268 return token;
269 }
270
271 private isValidSession(req: http.IncomingMessage): boolean {
272 const cookie = req.headers.cookie ?? "";

Callers 3

handleSetupMethod · 0.95
handleLoginMethod · 0.95
handlePasswordResetMethod · 0.95

Calls 1

setMethod · 0.65

Tested by

no test coverage detected