2

How to authenticate the client connecting to the websocket server?

In http we could use Oauth 2.0 to authenticate the user and the client too. But in websocket I am not able to understand how to do so.

As far as I can understand for authentication of the user connecting we could just ask the client to send a message with a token to authenticate the user. But how to prevent an un-identified client to connect to the server?

Isn't there any header for token based authentication for websocket as that would allow for both the authentication simultaneously just as in any Oauth 2.0 Rest api authentication.

Saransh Mohapatra
  • 9,430
  • 10
  • 39
  • 50
  • 3
    Check http://stackoverflow.com/questions/10332182/is-it-possible-to-secure-websocket-apis-with-oauth-2-0 – OneOfOne Jul 17 '14 at 01:44

0 Answers0