Unable to rebind WebSocketConnectionSource #13377
-
We derived our own IDE from the theia project version 1.34.4. As one of our adaptions we added an authentication token between the browser and the theia backend based on bearer tokens. We extended from WebSocketConnectionProvider and have overriden the function createWebSocket to inject an auth token: We created our own theia plugin called theia-tiger which was able to rebind the existing WebSocketConnectionProvider with our adapted class AuthConnectionProvider before the class was constructed. At the start() method just our AuthConnectionProvider was loaded: After PR #13082 the WebSocketConnectionProvider was replaced with WebSocketConnectionSource and also its instantiation time is now different: Our plugin theia-tiger loads later and is not able to rebind the already created socket: I'm not an inversify expert. I would have the follwing questions:
Thanks for your help! Additional Information
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Hey @BrightKn1ght, you need to rebind the |
Beta Was this translation helpful? Give feedback.
Hey @BrightKn1ght,
you need to rebind the
WebSocketConnectionSource
inside of a customfrontendPreload
module. As you have already noticed, binding it in afrontend
module is too late.