openvibers/openvibe.shared Commits
Shared: middleware extractToken drops the legacy token cookie (C-05) (#61)
Changes
@@@ -4,6 +4,12 @@ All notable changes to `openvibe-shared`. Versions follow [semver](https://semvebreaking change to any exported module, browser global or served file name is a new major.A release is the git tag `vX.Y.Z`; consumers pin the tag's tarball (see README).++## Unreleased++++- **Breaking (for a caller relying on it):** `middleware.js` `extractToken` no longer reads Live's legacy `token`++ cookie: only the bearer, `ov_token` and the WebSocket query parameter. Live stopped setting that cookie and Chat++ stopped reading it (compatibility register C-05). No OpenVibers service imports this module today.++## 3.0.1 — 2026-10-10- `notification-live.js` (the bell's realtime feed) resumes from Events' opaque cursor: `last_event_id` is the last@@@ -19,7 +19,6 @@ function extractToken(req) {}// 2. Cookieif (req.cookies?.ov_token) return req.cookies.ov_token;-- if (req.cookies?.token) return req.cookies.token; // legacy compat// 3. Query param (WebSocket upgrade)if (req.query?.token) return req.query.token;return null;
@@ -4,6 +4,12 @@ All notable changes to `openvibe-shared`. Versions follow [semver](https://semve
@@ -4,6 +4,12 @@ All notable changes to `openvibe-shared`. Versions follow [semver](https://semve
breaking change to any exported module, browser global or served file name is a new major.
breaking change to any exported module, browser global or served file name is a new major.
A release is the git tag `vX.Y.Z`; consumers pin the tag's tarball (see README).
A release is the git tag `vX.Y.Z`; consumers pin the tag's tarball (see README).
+## Unreleased
+
+- **Breaking (for a caller relying on it):** `middleware.js` `extractToken` no longer reads Live's legacy `token`
+ cookie: only the bearer, `ov_token` and the WebSocket query parameter. Live stopped setting that cookie and Chat
+ stopped reading it (compatibility register C-05). No OpenVibers service imports this module today.
+
## 3.0.1 — 2026-10-10
## 3.0.1 — 2026-10-10
- `notification-live.js` (the bell's realtime feed) resumes from Events' opaque cursor: `last_event_id` is the last
- `notification-live.js` (the bell's realtime feed) resumes from Events' opaque cursor: `last_event_id` is the last
@@ -19,7 +19,6 @@ function extractToken(req) {
@@ -19,7 +19,6 @@ function extractToken(req) {
}
}
// 2. Cookie
// 2. Cookie
if (req.cookies?.ov_token) return req.cookies.ov_token;
if (req.cookies?.ov_token) return req.cookies.ov_token;
- if (req.cookies?.token) return req.cookies.token; // legacy compat
// 3. Query param (WebSocket upgrade)
// 3. Query param (WebSocket upgrade)
if (req.query?.token) return req.query.token;
if (req.query?.token) return req.query.token;
return null;
return null;