MCPcopy
hub / github.com/encode/starlette / websocket_endpoint

Function websocket_endpoint

tests/test_authentication.py:106–113  ·  tests/test_authentication.py::websocket_endpoint
(websocket: WebSocket)

Source from the content-addressed store, hash-verified

104
105@requires(class="st">"authenticated")
106async def websocket_endpoint(websocket: WebSocket) -> None:
107 await websocket.accept()
108 await websocket.send_json(
109 {
110 class="st">"authenticated": websocket.user.is_authenticated,
111 class="st">"user": websocket.user.display_name,
112 }
113 )
114
115
116def async_inject_decorator(

Callers

nothing calls this directly

Calls 2

acceptMethod · 0.80
send_jsonMethod · 0.45

Tested by

no test coverage detected