Skip to content
This repository has been archived by the owner on Dec 18, 2018. It is now read-only.

Make the new bearer authentication support more standard compliant #1155

Closed
kevinchalet opened this issue Nov 27, 2017 · 6 comments
Closed

Comments

@kevinchalet
Copy link

Having built-in bearer authentication in the C#/TS clients is great but there are two annoying things in the current implementation:

  • The query string parameter name used by the TS client is non-standard and non-replaceable (the standard name is "access_token", not "signalRTokenHeader").

  • The jwtBearer properties/methods used in both clients have a name that assumes the token is a JWT, which is wrong as tokens are supposed to be opaque for clients.

/cc @Tratcher @davidfowl @moozzyk

@muratg
Copy link

muratg commented Nov 27, 2017

Thanks @PinpointTownes. What would you rename jwtBearer to? bearerToken or simply token?

@kevinchalet
Copy link
Author

token is probably fine, but if you want to be more specific, maybe accessToken would be better.

@kevinchalet
Copy link
Author

While we're at it, adding a built-in (opt-in?) feature that would automatically terminate the WebSocket connection when the token expires would be a truly awesome feature. The current behavior (same as SignalR 1 AFAICT) is not really ideal from a security perspective.

@muratg
Copy link

muratg commented Nov 27, 2017

@PinpointTownes filed https://github.com/aspnet/SignalR/issues/1159 to consider auto-terminate feature. Thanks for the suggestions.

@davidfowl
Copy link
Member

@anurse this is in preview1 right?

@analogrelay
Copy link
Contributor

Correct

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants