property WebSocketConnectionContext.user
Since 0.3.0

The authenticated principal, when one authenticated the upgrade. Populated by threading ctx.request.user through IWebSocketService.routeUpgrade; omitted when the upgrade was not authenticated. Read this in onOpen to identify the peer rather than re-deriving it from the headers.

Type

Usage

import { type WebSocketConnectionContext } from "common/src/index.ts";