How to authenticate websocket request

135 views
Skip to first unread message

bhanushal...@gmail.com

unread,
Nov 4, 2015, 11:34:13 AM11/4/15
to Ratchet
Hi people, I am able to run websocket server and everything is working as expected. But how can I authenticate websocket request.
For eg I have websocket server running now when I hit this websocket server from localhost, it show client connected in terminal. What I want is user should be able to connect to websocket server only from my web app and that too when they are logged In.

apk...@gmail.com

unread,
Apr 24, 2016, 10:13:13 AM4/24/16
to Ratchet
I am new to Retchet, but my understanding is there is no direct way to check sessions(in case you using session for logins) in websocket server, so only possible ways are (maybe i am wrong)

1. http://socketo.me/docs/sessions
2. Send msg to socket server from website to dynamically add authenticated connection. See http://socketo.me/docs/push where it is showed, how to use ZeroMQ to send message from website to socket server.

I hope it helps.
Reply all
Reply to author
Forward
0 new messages