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

Class User

apps/ws/src/SocketManager.ts:5–19  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3import { userJwtClaims } from './auth';
4
5export class User {
6 public socket: WebSocket;
7 public id: string;
8 public userId: string;
9 public name: string;
10 public isGuest?: boolean;
11
12 constructor(socket: WebSocket, userJwtClaims: userJwtClaims) {
13 this.socket = socket;
14 this.userId = userJwtClaims.userId;
15 this.id = randomUUID();
16 this.name = userJwtClaims.name;
17 this.isGuest = userJwtClaims.isGuest;
18 }
19}
20
21class SocketManager {
22 private static instance: SocketManager;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected