Skip to content

Update Header in the .Net client even if connection is connected #2142

Closed
corneliutusnea opened this Issue Jun 13, 2013 · 4 comments

4 participants

@corneliutusnea

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.

@abnanda1 abnanda1 was assigned Jun 27, 2013
@davidfowl
SignalR member

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.

@abnanda1 abnanda1 added a commit that referenced this issue Jul 3, 2013
@abnanda1 abnanda1 Added tests for headers f9f2b97
@abnanda1 abnanda1 added a commit that referenced this issue Jul 3, 2013
@abnanda1 abnanda1 Added tests for headers b5e56ec
@gustavo-armenta

ran automated tests and validated in code there is no restriction to add headers

@gustavo-armenta

@corneliutusnea
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.

@gustavo-armenta

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"

@abnanda1 abnanda1 added a commit that referenced this issue Sep 19, 2013
@abnanda1 abnanda1 Added tests for headers
#2142

Conflicts:
	tests/Microsoft.AspNet.SignalR.FunctionalTests/Client/ConnectionFacts.cs
	tests/Microsoft.AspNet.SignalR.FunctionalTests/Client/HubProxyFacts.cs
45db161
@abnanda1 abnanda1 added a commit that referenced this issue Sep 19, 2013
@abnanda1 abnanda1 Made changes as per code review feedback
#2142

Conflicts:
	tests/Microsoft.AspNet.SignalR.FunctionalTests/Client/ConnectionFacts.cs
	tests/Microsoft.AspNet.SignalR.FunctionalTests/Client/HubProxyFacts.cs
68645df
@abnanda1 abnanda1 added a commit that referenced this issue Sep 19, 2013
@abnanda1 abnanda1 Made changes as per code review feedback
#2142

Conflicts:
	tests/Microsoft.AspNet.SignalR.FunctionalTests/Client/ConnectionFacts.cs
	tests/Microsoft.AspNet.SignalR.FunctionalTests/Client/HubProxyFacts.cs
e69880d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.