The Headers on the Connection should be updatable at any point in time even if the connection is already connected. Any new connection on the transport should use the new Header.
This allows us to refresh and change the OAuth2 tokens on the fly while the connection is Connected and have new connections use the new headers.
Let's remove the check for modifying headers. This is a valid use case that doesnt change the IPrincipal but does allow changing the header since the token expires.
Removed restriction on adding/removing headers once connection has st…
Added tests to check that headers can be added after connection has s…
Removed the headers error message from resources
Made changes as per code review feedback
Removed restrictions on adding headers after connection has started
Added tests for headers
ran automated tests and validated in code there is no restriction to add headers
Could you share a sample client and server doing OAuth? You could save it here (https://skydrive.live.com/redir?resid=8DCE4B0DA74046FC!653) or simply create a git repo.
on reconnecting event, I added a new header. I see the new header is used on new requests of type "/signalr/reconnect" and "signalr/poll"