SIP.js
SIP.js copied to clipboard
Support for ephemeral credentials
Hi, this is more a enhancement request/suggestion than an issue.
I would like to use ephemeral credentials to verify my user agent on establishing the websocket connection rather than passing through my user's real credentials in the register message. I believe there are two methods to do this, one is to pass through the username and password as query parameters in the ws_uri, the other is to pass through the credentials using cookies. See http://kamailio.org/docs/modules/4.3.x/modules/auth_ephemeral.html for further details.
I've created a branch to do this where I can pass through a function in wsServers UA config that is called on SIP.Transport.connect to update the query parameters (or in theory could return null and just update any cookies that are set), but I thought others may want similar functionality so I thought it would be worth submitting an issue for you to consider. See https://github.com/onsip/SIP.js/compare/master...jamesaylett:ephemeral-credentials for a diff of my implementation.
It's an interesting concept. I am not sure if there is enough demand for it to be merged into SIP.js proper. I do want to make the Transport layer slightly more pluggable, though, so that changes like these can be included more easily without carrying around a custom fork. It's something to consider.
You can continue to use digest auth with auth_ephemeral. What trouble are you having using that approach?
Closing due to lack of activity/interest.