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

Function websocket_endpoint_decorated

tests/test_authentication.py:176–184  ·  tests/test_authentication.py::websocket_endpoint_decorated
(websocket: WebSocket, additional: str)

Source from the content-addressed store, hash-verified

174@ws_inject_decorator(additional=class="st">"payload")
175@requires(class="st">"authenticated")
176async def websocket_endpoint_decorated(websocket: WebSocket, additional: str) -> None:
177 await websocket.accept()
178 await websocket.send_json(
179 {
180 class="st">"authenticated": websocket.user.is_authenticated,
181 class="st">"user": websocket.user.display_name,
182 class="st">"additional": additional,
183 }
184 )
185
186
187app = Starlette(

Callers

nothing calls this directly

Calls 2

acceptMethod · 0.80
send_jsonMethod · 0.45

Tested by

no test coverage detected