You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
rename id to token; change handle-frames signature
- rename `id` to `token`: This helps emphasize that it's a secret.
- change `handle-frames` signature: for security, don't pass frames from
multiple clients to a single call to a single instance.
Signed-off-by: Joel Dice <[email protected]>
@@ -175,7 +174,7 @@ As frames arrive from the client, Spin will create new instances and pass the fr
175
174
176
175
If a connection is lost unexpectedly prior to receiving a WebSocket `close` frame from the client, Spin will attempt synthesize such a frame and deliver to the application, giving it an opportunity to clean up associated state. Note, however, there is no guarantee that the app will always receive a `close` frame promptly or at all -- external factors such as network failures or power loss might delay or prevent that, so apps should not rely exclusively on it.
177
176
178
-
Each open WebSocket will be assigned a unique, opaque ID (e.g. a 128-bit, base-64-encoded, securely-generated random number) which may be used by any component of any type (e.g. `http`, `redis`, or `websocket`) to send frames to the client via `fermyon:spin/inbound-websocket-send#send-frame`. For example, a chat application might use these IDs (or aliases thereof) to route chat messages within a group.
177
+
Each open WebSocket will be assigned a unique, opaque token (e.g. a 128-bit, base-64-encoded, securely-generated random number, or perhaps a signed, encrypted auth token) which may be used by any component of any type (e.g. `http`, `redis`, `websocket`, etc.) to send frames to the client via `fermyon:spin/inbound-websocket-send#send-frame`. For example, a chat application might use these tokens (or aliases thereof) to route chat messages within a group.
0 commit comments