Using realtime (preferably) is it possible for a single endpoint to use more than one set of credentials? I want to use web sockets in a web application and I envision the following flow:
- User opens app
- User logs in with email/password, this is not linked to Asterisk at all. Think for example logging in with something like Auth0.
- After login, the app generates a temporary password for the current session, this password is used for the web socket login.
However said user may also be logged into a hardphone (multiple registrations) and I would not want to break the hardphone connection. That is why I am wondering if it is possible to have multiple credentials.
So far I tried to simply add a new row to ps_auths
with the same username but different password, however after setting on core set debug 5
I see that the queries for authentication being produced are the following:
SELECT * FROM ps_auths WHERE id = ?
And ID is a primary key (unique) so it won’t work. I was hoping the query would search by username and tried all registries but apparently it does not.
So is there some other way I may be missing to accomplish this or something similar?