title: Websocket connection with authorization header
body: <p>I am working on a real time websocket application where in the server is coded with .Net core where as clients can be in several different languages. The way I decided to secure the server is JWT, i.e. to accept a socket connection only from a request with valid JWT. I could successfully do so with .Net client, here is my code:</p>
  <pre><code>        _client = new WebSocket(&quot;ws://localhost:8080/api/SocketDock&quot;,&quot;&quot;,null,new List&lt;KeyValuePair&lt;string, string&gt;&gt;()
          { new KeyValuePair&lt;string, string&gt;(
              &quot;Authorization&quot;, &quot;Bearer eyJhbGciOiJIUzI1.....&quot;) 
          });
  </code></pre>
  <p>This is working perfectly fine with .net core client websocket. However, I am not able to do the same with Angular client. I went through several articles somehow ending up with an answer that it is not possible. However, it is seems to me a matter of common sense that if a protocol or handshake is possible in one language, it must be possible in others too.</p>
  <p>Can someone guide me proper way to achieve the same with any Angular client.</p>