Determines unsubscribed user auth_id

#1

`for determine subscribed user_id i can do:

`
@inlineCallbacks
def on_subscribe(sessionid, subscriptionid):
session_detail = yield self.call(‘wamp.session.get’, sessionid)
print(session_detail[‘authid’])
yield self.subscribe(on_subscribe, ‘wamp.subscription.on_subscribe’)

``

But as do same for disconnected users in ‘wamp.subscription.on_unsubscribe’ i can’t use 'wamp.session.get'because session already dropped?
PS: I want track who is online in the chat now

0 Likes

#2

Hi Sergey!

That’s correct: Crossbar.io drops the session, and consequently can’t provide any more information about it.

How would you like to see this handled?

Regards,

Alex

···

Am Dienstag, 20. Oktober 2015 15:16:58 UTC+2 schrieb Sergey Maranchuk:

`for determine subscribed user_id i can do:

`
@inlineCallbacks
def on_subscribe(sessionid, subscriptionid):
session_detail = yield self.call(‘wamp.session.get’, sessionid)
print(session_detail[‘authid’])
yield self.subscribe(on_subscribe, ‘wamp.subscription.on_subscribe’)

``

But as do same for disconnected users in ‘wamp.subscription.on_unsubscribe’ i can’t use 'wamp.session.get'because session already dropped?
PS: I want track who is online in the chat now

0 Likes

#3

tnx, will store sessionid: auth_id myself

How would you like to see this handled?

i don’t have ideas, but Session in crossbar is annoying, for example pusher share auth_id https://pusher.com/docs/webhooks#member_removed

0 Likes

#4

Hi Sergey!

What to transmit is a balancing act between keeping wire traffic down and ease of use.

We had a discussion a bit back about this, and we’re thinking of providing the authid and the authrole in addition to the sessionid. That might be a good compromise, since most of the time when this question crops up these two bits of information are what people require. Would that solve your use case?

Regards,

Alex

···

Am Donnerstag, 22. Oktober 2015 13:09:08 UTC+2 schrieb Sergey Maranchuk:

tnx, will store sessionid: auth_id myself

How would you like to see this handled?

i don’t have ideas, but Session in crossbar is annoying, for example pusher share auth_id https://pusher.com/docs/webhooks#member_removed

0 Likes

#5

Yes, tnx)
But i think will be better allow store custom info in session wich can be set in authenticator and share as dict/sessionobj for example like {‘sessionid’: ‘xxx’, ‘authrole’: ‘’, ‘profile_id’: 1 …}.
Now in authenticator you can set only specific session data like {“role”:“user”}, why not provide same opportunity for custom session data?

···

четверг, 22 октября 2015 г., 14:44:21 UTC+3 пользователь Alexander Gödde написал:

Hi Sergey!

What to transmit is a balancing act between keeping wire traffic down and ease of use.

We had a discussion a bit back about this, and we’re thinking of providing the authid and the authrole in addition to the sessionid. That might be a good compromise, since most of the time when this question crops up these two bits of information are what people require. Would that solve your use case?

Regards,

Alex

Am Donnerstag, 22. Oktober 2015 13:09:08 UTC+2 schrieb Sergey Maranchuk:

tnx, will store sessionid: auth_id myself

How would you like to see this handled?

i don’t have ideas, but Session in crossbar is annoying, for example pusher share auth_id https://pusher.com/docs/webhooks#member_removed

0 Likes

#6

Hi Sergey!

With any request like this it’s always the question what you gain for the added complexity. What are use cases you see for the custom information? Could these not be solved more cleanly with some app-level lookup mechanism?

Regards,

Alex

···

Am Donnerstag, 22. Oktober 2015 14:11:37 UTC+2 schrieb Sergey Maranchuk:

Yes, tnx)
But i think will be better allow store custom info in session wich can be set in authenticator and share as dict/sessionobj for example like {‘sessionid’: ‘xxx’, ‘authrole’: ‘’, ‘profile_id’: 1 …}.
Now in authenticator you can set only specific session data like {“role”:“user”}, why not provide same opportunity for custom session data?

четверг, 22 октября 2015 г., 14:44:21 UTC+3 пользователь Alexander Gödde написал:

Hi Sergey!

What to transmit is a balancing act between keeping wire traffic down and ease of use.

We had a discussion a bit back about this, and we’re thinking of providing the authid and the authrole in addition to the sessionid. That might be a good compromise, since most of the time when this question crops up these two bits of information are what people require. Would that solve your use case?

Regards,

Alex

Am Donnerstag, 22. Oktober 2015 13:09:08 UTC+2 schrieb Sergey Maranchuk:

tnx, will store sessionid: auth_id myself

How would you like to see this handled?

i don’t have ideas, but Session in crossbar is annoying, for example pusher share auth_id https://pusher.com/docs/webhooks#member_removed

0 Likes

#7

No, a WAMP router should not “store” app specific (custom) data - as it should not run app specific code.

···

Am Donnerstag, 22. Oktober 2015 14:11:37 UTC+2 schrieb Sergey Maranchuk:

Yes, tnx)
But i think will be better allow store custom info in session wich can be set in authenticator and share as dict/sessionobj for example like {‘sessionid’: ‘xxx’, ‘authrole’: ‘’, ‘profile_id’: 1 …}.
Now in authenticator you can set only specific session data like {“role”:“user”}, why not provide same opportunity for custom session data?

четверг, 22 октября 2015 г., 14:44:21 UTC+3 пользователь Alexander Gödde написал:

Hi Sergey!

What to transmit is a balancing act between keeping wire traffic down and ease of use.

We had a discussion a bit back about this, and we’re thinking of providing the authid and the authrole in addition to the sessionid. That might be a good compromise, since most of the time when this question crops up these two bits of information are what people require. Would that solve your use case?

Regards,

Alex

Am Donnerstag, 22. Oktober 2015 13:09:08 UTC+2 schrieb Sergey Maranchuk:

tnx, will store sessionid: auth_id myself

How would you like to see this handled?

i don’t have ideas, but Session in crossbar is annoying, for example pusher share auth_id https://pusher.com/docs/webhooks#member_removed

0 Likes