asab_webui_shell 27.2.7 → 27.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -402,7 +402,14 @@ class Application extends _react.Component {
|
|
|
402
402
|
for (var interceptor of this.WebSocketInterceptors.keys()) {
|
|
403
403
|
// Avoid pushing undefined interceptor values
|
|
404
404
|
if (interceptor) {
|
|
405
|
-
|
|
405
|
+
/*
|
|
406
|
+
Interceptor should be a function that returns the current subprotocol value
|
|
407
|
+
Otherwise use the value directly (for backward compatibility)
|
|
408
|
+
*/
|
|
409
|
+
var interceptorValue = typeof interceptor === 'function' ? interceptor() : interceptor;
|
|
410
|
+
if (interceptorValue) {
|
|
411
|
+
subprotocols.push(interceptorValue);
|
|
412
|
+
}
|
|
406
413
|
}
|
|
407
414
|
}
|
|
408
415
|
|
|
@@ -195,7 +195,8 @@ class AuthModule extends _asab_webui_components.Module {
|
|
|
195
195
|
return interceptor;
|
|
196
196
|
}
|
|
197
197
|
webSocketAuthInterceptor() {
|
|
198
|
-
|
|
198
|
+
// Return a function to ensure that the token is always current and not static
|
|
199
|
+
return () => "access_token_".concat(this.OAuthTokens['access_token']);
|
|
199
200
|
}
|
|
200
201
|
simulateUserinfo(mock_userinfo) {
|
|
201
202
|
var _this2 = this;
|