PHP Sockets - Store User login -


hey there i'm trying implement php socket service used simple shoutbox. shoutbox has simple login form , authentication system based of sessions.

when user logins post requests gets made comparing values database , if valid create session under user.

since these sessions stored on clients computer wondering how php socket able obtain these when it's running on server. php socket running on server , try obtain session server session stored on users pc on login.

i have shoutbox running in php , html5 sockets issue login step i'm not entirely sure how do.

info:

  • cookies stored in browser, sessions stored on server.

in case store session id in database , pass along socket call, can verify database.

issues login on web (http) , using session within socket

  • passing session id http socket reused on computer , fake successful login.
  • login on http expires after time, not mean socket connection has ended
  • ending socket connection not log out http

secure approach

  • pass username , password on first call within socket login securely. since socket remains open user authenticated , dont need pass session.
  • once socket closes session close

Comments

Popular posts from this blog

google api - Incomplete response from Gmail API threads.list -

Installing Android SQLite Asset Helper -

Qt Creator - Searching files with Locator including folder -