{"action":"created","issue":{"url":"https://api.github.com/repos/wamp-proto/wamp-proto/issues/238","repository_url":"https://api.github.com/repos/wamp-proto/wamp-proto","labels_url":"https://api.github.com/repos/wamp-proto/wamp-proto/issues/238/labels{/name}","comments_url":"https://api.github.com/repos/wamp-proto/wamp-proto/issues/238/comments","events_url":"https://api.github.com/repos/wamp-proto/wamp-proto/issues/238/events","html_url":"https://github.com/wamp-proto/wamp-proto/issues/238","id":136471256,"number":238,"title":"More informations for wamp.session.on_leave","user":{"login":"Paranaix","id":1858546,"avatar_url":"https://avatars.githubusercontent.com/u/1858546?v=3","gravatar_id":"","url":"https://api.github.com/users/Paranaix","html_url":"https://github.com/Paranaix","followers_url":"https://api.github.com/users/Paranaix/followers","following_url":"https://api.github.com/users/Paranaix/following{/other_user}","gists_url":"https://api.github.com/users/Paranaix/gists{/gist_id}","starred_url":"https://api.github.com/users/Paranaix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Paranaix/subscriptions","organizations_url":"https://api.github.com/users/Paranaix/orgs","repos_url":"https://api.github.com/users/Paranaix/repos","events_url":"https://api.github.com/users/Paranaix/events{/privacy}","received_events_url":"https://api.github.com/users/Paranaix/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-02-25T18:29:14Z","updated_at":"2016-02-25T20:15:50Z","closed_at":null,"body":"Currently `wamp.session.on_leave` only receives the session id as sole argument. This imposes a problem, as a subscribee has no way to acquire additional informations he might be interested in like, authid, role or the realm left.\r\n\r\nBut wait, isn't there `wamp.session.get` you might ask now. Indeed there is, but the current draft makes no assertions about whether the session information can still be queried in `wamp.session.on_leave` and the standard implementation crossbar will currently let you down in that regard and correctly tells you, that he doesn't have such a session, as it has already been left."},"comment":{"url":"https://api.github.com/repos/wamp-proto/wamp-proto/issues/comments/188960650","html_url":"https://github.com/wamp-proto/wamp-proto/issues/238#issuecomment-188960650","issue_url":"https://api.github.com/repos/wamp-proto/wamp-proto/issues/238","id":188960650,"user":{"login":"oberstet","id":233340,"avatar_url":"https://avatars.githubusercontent.com/u/233340?v=3","gravatar_id":"","url":"https://api.github.com/users/oberstet","html_url":"https://github.com/oberstet","followers_url":"https://api.github.com/users/oberstet/followers","following_url":"https://api.github.com/users/oberstet/following{/other_user}","gists_url":"https://api.github.com/users/oberstet/gists{/gist_id}","starred_url":"https://api.github.com/users/oberstet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oberstet/subscriptions","organizations_url":"https://api.github.com/users/oberstet/orgs","repos_url":"https://api.github.com/users/oberstet/repos","events_url":"https://api.github.com/users/oberstet/events{/privacy}","received_events_url":"https://api.github.com/users/oberstet/received_events","type":"User","site_admin":false},"created_at":"2016-02-25T20:15:50Z","updated_at":"2016-02-25T20:15:50Z","body":"Yes, I agree with all of your description, and yeah, it's bad.\r\n\r\nIt's probably worth mentioning that `wamp.session.on_leave` should probably get not only the `sessionid`, but also `authid` and `authrole` of the leaving (or left? see below) session. We could add that as keyword arguments to the user hook, and that would make it backwards compatible. The `sessionid` would continue being delivered as a positional argument.\r\n\r\nNow, is the session \"still there\" when `wamp.session.on_leave` fires and presumably then can be queried using `wamp.session.get`? As soon as one WAMP peer starts a closing handshake, the session will no longer process WAMP messages other than required for the closing handshake. The session information is currently garbage collected when the WAMP session ends, but the information tracked about a session could continue to exist after the session ends. That would be useful, definitely."}}