How to organize authentication in websockets

I have project on php and websocket server, written on C using libwebsockets.

And i have to organize some authentication logic between client side js code and server side.

On php i use sessions with PHPSESSID cookie set on client side after successfull login.

I can access that cookie on websocket server but,

how to compare it with session_id() on server’s php side?

137 thoughts on “How to organize authentication in websockets”

  1. Howdy just wanted to give you a quick heads up. The words in your content seem to be running off the screen in Ie.
    I’m not sure if this is a formatting issue or something to do
    with web browser compatibility but I figured I’d post to let you know.
    The design and style look great though! Hope you get the issue resolved soon. Thanks

  2. I just could not leave your web site prior to suggesting that I extremely loved the standard information a person provide to your guests? Is gonna be back frequently in order to inspect new posts.

  3. I just could not go away your website prior to suggesting that I extremely enjoyed the usual information a person supply on your visitors? Is going to be again frequently in order to inspect new posts.

  4. Nice post. I learn something new and challenging on blogs I
    stumbleupon every day. It’s always exciting to read content from other authors and practice
    something from other sites.

  5. Hello! I know this is kinda off topic however , I’d figured I’d ask.
    Would you be interested in exchanging links or maybe guest writing a blog post or vice-versa?
    My site goes over a lot of the same topics as yours and I believe we could greatly benefit from each other.
    If you happen to be interested feel free to shoot me an e-mail.
    I look forward to hearing from you! Fantastic blog by the

  6. Hello there, I found your website by way of Google at the same time
    as searching for a comparable matter, your web site came up, it seems to be great.
    I have bookmarked it in my google bookmarks.
    Hi there, just became alert to your weblog thru
    Google, and located that it is truly informative.
    I am gonna be careful for brussels. I’ll be grateful in the event you continue this in future.
    A lot of people can be benefited out of your writing.

  7. It is perfect time to make some plans for the future and it is time to be happy. I’ve read this post and if I could I wish to suggest you some interesting things or tips. Perhaps you could write next articles referring to this article. I desire to read more things about it!


Leave a Comment