{"action":"created","issue":{"url":"https://api.github.com/repos/django/channels/issues/327","repository_url":"https://api.github.com/repos/django/channels","labels_url":"https://api.github.com/repos/django/channels/issues/327/labels{/name}","comments_url":"https://api.github.com/repos/django/channels/issues/327/comments","events_url":"https://api.github.com/repos/django/channels/issues/327/events","html_url":"https://github.com/django/channels/issues/327","id":174144895,"number":327,"title":"Ability to deny websockets during handshake phase","user":{"login":"andrewgodwin","id":36182,"avatar_url":"https://avatars.githubusercontent.com/u/36182?v=3","gravatar_id":"","url":"https://api.github.com/users/andrewgodwin","html_url":"https://github.com/andrewgodwin","followers_url":"https://api.github.com/users/andrewgodwin/followers","following_url":"https://api.github.com/users/andrewgodwin/following{/other_user}","gists_url":"https://api.github.com/users/andrewgodwin/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewgodwin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewgodwin/subscriptions","organizations_url":"https://api.github.com/users/andrewgodwin/orgs","repos_url":"https://api.github.com/users/andrewgodwin/repos","events_url":"https://api.github.com/users/andrewgodwin/events{/privacy}","received_events_url":"https://api.github.com/users/andrewgodwin/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/django/channels/labels/enhancement","name":"enhancement","color":"1d76db"},{"url":"https://api.github.com/repos/django/channels/labels/exp/advanced","name":"exp/advanced","color":"bfdadc"}],"state":"open","locked":false,"assignee":{"login":"andrewgodwin","id":36182,"avatar_url":"https://avatars.githubusercontent.com/u/36182?v=3","gravatar_id":"","url":"https://api.github.com/users/andrewgodwin","html_url":"https://github.com/andrewgodwin","followers_url":"https://api.github.com/users/andrewgodwin/followers","following_url":"https://api.github.com/users/andrewgodwin/following{/other_user}","gists_url":"https://api.github.com/users/andrewgodwin/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewgodwin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewgodwin/subscriptions","organizations_url":"https://api.github.com/users/andrewgodwin/orgs","repos_url":"https://api.github.com/users/andrewgodwin/repos","events_url":"https://api.github.com/users/andrewgodwin/events{/privacy}","received_events_url":"https://api.github.com/users/andrewgodwin/received_events","type":"User","site_admin":false},"assignees":[{"login":"andrewgodwin","id":36182,"avatar_url":"https://avatars.githubusercontent.com/u/36182?v=3","gravatar_id":"","url":"https://api.github.com/users/andrewgodwin","html_url":"https://github.com/andrewgodwin","followers_url":"https://api.github.com/users/andrewgodwin/followers","following_url":"https://api.github.com/users/andrewgodwin/following{/other_user}","gists_url":"https://api.github.com/users/andrewgodwin/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewgodwin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewgodwin/subscriptions","organizations_url":"https://api.github.com/users/andrewgodwin/orgs","repos_url":"https://api.github.com/users/andrewgodwin/repos","events_url":"https://api.github.com/users/andrewgodwin/events{/privacy}","received_events_url":"https://api.github.com/users/andrewgodwin/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2016-08-30T22:49:37Z","updated_at":"2016-10-14T03:22:15Z","closed_at":null,"body":"It would be nice to have a way to accept or deny sockets during the handshake phase (before the connection is opened) based on the HTTP attributes/cookies/etc.\r\n\r\nThis would require the interface server to send a message during handshaking with the same details as `websocket.connect`, and then wait for a reply with either an \"accept\" or \"drop\" message so that the interface server could either continue with the handshake or drop it with an appropriate error code.\r\n\r\nWe could even potentially override `websocket.connect` to do this, but there would need to be some system in place for channels that caught connect handlers that did not send accept/deny and warn users that they need to, as it would be a backwards incompatible change.\r\n\r\nMaking `connect` do this also has the advantage that `enforce_ordering` would be needed way less, as there would be no way to receive messages before `connect` had returned a yes or no result."},"comment":{"url":"https://api.github.com/repos/django/channels/issues/comments/253700136","html_url":"https://github.com/django/channels/issues/327#issuecomment-253700136","issue_url":"https://api.github.com/repos/django/channels/issues/327","id":253700136,"user":{"login":"andrewgodwin","id":36182,"avatar_url":"https://avatars.githubusercontent.com/u/36182?v=3","gravatar_id":"","url":"https://api.github.com/users/andrewgodwin","html_url":"https://github.com/andrewgodwin","followers_url":"https://api.github.com/users/andrewgodwin/followers","following_url":"https://api.github.com/users/andrewgodwin/following{/other_user}","gists_url":"https://api.github.com/users/andrewgodwin/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewgodwin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewgodwin/subscriptions","organizations_url":"https://api.github.com/users/andrewgodwin/orgs","repos_url":"https://api.github.com/users/andrewgodwin/repos","events_url":"https://api.github.com/users/andrewgodwin/events{/privacy}","received_events_url":"https://api.github.com/users/andrewgodwin/received_events","type":"User","site_admin":false},"created_at":"2016-10-14T03:22:15Z","updated_at":"2016-10-14T03:22:15Z","body":"This is actually in the master branch now in a mostly-complete form, just needs some polish before I call it done."}}
{"actor":{"display_login":"andrewgodwin"}}