Picture of tsn
Registered 4 years 300 days
tsn Friday, 5 March 2021, 11:05 AM
Get username from incoming WS connection
Hi guys, Could you please clarify is it possible to identify a user who connects to the app instance over WebSocket connection? For example, if app is opened in myApps launcher and WebSocket connection is established where can I find which user connected to my app? Thanks in advance, Sergey
Picture of Daniel Deterding (innovaphone)
Moderator Registered 15 years 121 days
Daniel Deterding (innovaphone) Friday, 5 March 2021, 11:13 AM
Re: Get username from incoming WS connection
Hi Sergey,

on C++ server side, your session class is inherited by AppWebsocket, which contains the public members domain, sip and dn which identify a user:
http://sdk.innovaphone.com/common/lib/appwebsocket.htm#AppWebsocket

On the javascript side, the onconnected callback hands domain, user (aka sip) and dn:
http://sdk.innovaphone.com/web1/appwebsocket/appwebsocket.htm

Greetings,
Daniel


Picture of tsn
Registered 4 years 300 days
tsn Friday, 5 March 2021, 11:17 AM
Re: Get username from incoming WS connection
Hi Daniel,

Thank you for quick reply. This is exactly what I need.

Best regards,
Sergey
← You can define your color theme preference here