{"action":"created","issue":{"url":"https://api.github.com/repos/deployd/deployd/issues/540","labels_url":"https://api.github.com/repos/deployd/deployd/issues/540/labels{/name}","comments_url":"https://api.github.com/repos/deployd/deployd/issues/540/comments","events_url":"https://api.github.com/repos/deployd/deployd/issues/540/events","html_url":"https://github.com/deployd/deployd/pull/540","id":63732784,"number":540,"title":"feature(session): bind socket to session","user":{"login":"andreialecu","id":697707,"avatar_url":"https://avatars.githubusercontent.com/u/697707?v=3","gravatar_id":"","url":"https://api.github.com/users/andreialecu","html_url":"https://github.com/andreialecu","followers_url":"https://api.github.com/users/andreialecu/followers","following_url":"https://api.github.com/users/andreialecu/following{/other_user}","gists_url":"https://api.github.com/users/andreialecu/gists{/gist_id}","starred_url":"https://api.github.com/users/andreialecu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andreialecu/subscriptions","organizations_url":"https://api.github.com/users/andreialecu/orgs","repos_url":"https://api.github.com/users/andreialecu/repos","events_url":"https://api.github.com/users/andreialecu/events{/privacy}","received_events_url":"https://api.github.com/users/andreialecu/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/deployd/deployd/labels/needs:%20review","name":"needs: review","color":"eb6420"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-03-23T14:14:18Z","updated_at":"2015-03-23T18:55:07Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/deployd/deployd/pulls/540","html_url":"https://github.com/deployd/deployd/pull/540","diff_url":"https://github.com/deployd/deployd/pull/540.diff","patch_url":"https://github.com/deployd/deployd/pull/540.patch"},"body":"This allows binding the socket to a session at a later time than the initial handshake when a sid cookie may not be available.\r\n\r\nExample usage:\r\n```javascript\r\ndpd.users.login({ username: 'foo', password: 'bar'}).then(function(res) {\r\n  dpd.socket.emit('server:setSession', { sid: res.id });\r\n}\r\n```\r\n\r\nIt should fix #533 "},"comment":{"url":"https://api.github.com/repos/deployd/deployd/issues/comments/85143706","html_url":"https://github.com/deployd/deployd/pull/540#issuecomment-85143706","issue_url":"https://api.github.com/repos/deployd/deployd/issues/540","id":85143706,"user":{"login":"andreialecu","id":697707,"avatar_url":"https://avatars.githubusercontent.com/u/697707?v=3","gravatar_id":"","url":"https://api.github.com/users/andreialecu","html_url":"https://github.com/andreialecu","followers_url":"https://api.github.com/users/andreialecu/followers","following_url":"https://api.github.com/users/andreialecu/following{/other_user}","gists_url":"https://api.github.com/users/andreialecu/gists{/gist_id}","starred_url":"https://api.github.com/users/andreialecu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andreialecu/subscriptions","organizations_url":"https://api.github.com/users/andreialecu/orgs","repos_url":"https://api.github.com/users/andreialecu/repos","events_url":"https://api.github.com/users/andreialecu/events{/privacy}","received_events_url":"https://api.github.com/users/andreialecu/received_events","type":"User","site_admin":false},"created_at":"2015-03-23T18:55:07Z","updated_at":"2015-03-23T18:55:07Z","body":"I was thinking about it, we need to patch it in dpd.js (client) somehow. The login function needs special consideration, right now it's just a plain REST call like everything else.\r\n\r\nWe need to intercept just that one and emit that message from it. I will think of a way to do this cleanly, but it can be a separate PR."}}