MCPcopy Create free account
hub / github.com/avoidwork/tenso / sessionAuthCheck

Function sessionAuthCheck

benchmarks/auth.js:386–390  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

384 sessionStore.set("admin-session", { userId: 1, role: "admin", authenticated: true });
385
386 const sessionAuthCheck = sessionId => {
387 const session = sessionStore.get(sessionId);
388
389 return session && session.authenticated === true;
390 };
391
392 const sessionRoleCheck = (sessionId, requiredRole) => {
393 const session = sessionStore.get(sessionId);

Callers 1

benchmarkSessionAuthFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected