MCPcopy Create free account
hub / github.com/code100x/chess / extractAuthUser

Function extractAuthUser

apps/ws/src/auth/index.ts:14–17  ·  view source on GitHub ↗
(token: string, ws: WebSocket)

Source from the content-addressed store, hash-verified

12}
13
14export const extractAuthUser = (token: string, ws: WebSocket): User => {
15 const decoded = jwt.verify(token, JWT_SECRET) as userJwtClaims;
16 return new User(ws, decoded);
17};

Callers 1

index.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected