-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support extracting userId from incoming JWT claims #2056
Comments
Sounds nice, cc @Y-Sindo |
You can use |
We use a third party Identity Provider and in JWT token issued by it, the user identifier claim is named |
Currently the header can't be customized to be |
Currently there are limited ways to specify user identity to be used for SignalR in Azure functions when using Node.js runtime. One can use input binding property
userId
to only specify that it should be extracted from header field or query parameter. However these days the APIs are commonly called with JWT tokens, that already contain verified user identifier and this is also common case when calling SignaRnegotiate
endpoint.It would be helpful to extend
userId
to support also specifying the claim name from incoming JWT token to be used as user identifier for SIgnalR, for example:With combination of
idToken
andclaimTypeList
it is already possible to propagate claims from incoming JWT token into SignalR access token, but there is no way to specify which one is supposed to be used as user idemtity, therefore SignalR does not pick it up, even if identiy claim is propagated. Thats where the enhancement ofuserId
possibilities would help - you could explicitly specify which claim is to be used as user identity for SignalR.This would allow to solve the use cases like this
The text was updated successfully, but these errors were encountered: