()
| 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 ?? ""; |
no test coverage detected