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
SockJSClient does a ServerInfo request to obtain capabilities supported by SockJS server. The websocket endpoint is secured with BASIC AUTH, thus i need to pass in valid credentials by adding HttpHeaders to the WebSocketConnectionManager.
When using raw rfc-6455 websockets the user gets authenticated and everything is fine.
But when using SockJS with RestTemplateXhrTransport and WebSocketTransport the user will not be authenticated while the SockJSClient does the ServerInfo request.
The HttpHeaders added to the WebSocketConnectionManager will not be used for the ServerInfo request.
As a workaround i can configure a RestTemplateXhrTransport as InfoReceiver and pass in the HttpHeaders there, but then i have to configure the authentication credentials twice. And thats not what i want.