Authentication in Ratchet Webocket server
Hi! I want to do an authentication on Ratchet Webocket server. I've came to the idea to pass username and password in url(when connecting via js websocket client) and then perform standard login uing PDO. I would like to do an authentication and then send a mesage to user whether it was successful, and if not, close the connection. I'm not sure how to do thi as there are no such issues on the web and in the documentation either. I tried to do this in the SocketServer class(copied from tutorial and modified by me, implements Ratchet\MessageComponentInterface) but I can't figure out how to force closing connection there. So theres quetion number one how to do such thing? I also tried to do this in Guzzle\Http\Message\Request as there's a method named setAuth but I have no clue how to use it. Please help.
