How can I get the authrole/authid (WAMP-CRA auth) with Autobahn|JS?

#1

Hello,

I am trying to store permanently a authrole and authid when I auth a connection, I have a onChallenge method that send the secret (and the backend in Python sends a dict containing the new authid, and authrole).

Is there somewhere in the connection object or the session object, a field authrole, authid ?

Sorry, if it is mentioned somewhere, I am getting confused with Autobahn|JS doc, and latest releases, and I don’t really want to search for it in the source code.

Thanks in advance, and thanks for Autobahn !

0 Likes

#2

Hi Raito!

The connection object has an _options property, and this contains the authid.

Regards,

Alex

···

Am Dienstag, 7. April 2015 13:15:53 UTC+2 schrieb Raito Bezarius:

Hello,

I am trying to store permanently a authrole and authid when I auth a connection, I have a onChallenge method that send the secret (and the backend in Python sends a dict containing the new authid, and authrole).

Is there somewhere in the connection object or the session object, a field authrole, authid ?

Sorry, if it is mentioned somewhere, I am getting confused with Autobahn|JS doc, and latest releases, and I don’t really want to search for it in the source code.

Thanks in advance, and thanks for Autobahn !

0 Likes

#3

Thanks you, Alexander !

Does it contain as well authrole and other auth data?

Regards,

Raito

···

Le mardi 7 avril 2015 13:46:23 UTC+2, Alexander Gödde a écrit :

Hi Raito!

The connection object has an _options property, and this contains the authid.

Regards,

Alex

Am Dienstag, 7. April 2015 13:15:53 UTC+2 schrieb Raito Bezarius:

Hello,

I am trying to store permanently a authrole and authid when I auth a connection, I have a onChallenge method that send the secret (and the backend in Python sends a dict containing the new authid, and authrole).

Is there somewhere in the connection object or the session object, a field authrole, authid ?

Sorry, if it is mentioned somewhere, I am getting confused with Autobahn|JS doc, and latest releases, and I don’t really want to search for it in the source code.

Thanks in advance, and thanks for Autobahn !

0 Likes

#4

Did you find solution to your question? I am looking for same thing.

0 Likes

#5

this should NOT be used, as this is a private attribute of the Connection class

···

Am Dienstag, 7. April 2015 13:46:23 UTC+2 schrieb Alexander Gödde:

Hi Raito!

The connection object has an _options property, and this contains the authid.

Regards,

Alex

Am Dienstag, 7. April 2015 13:15:53 UTC+2 schrieb Raito Bezarius:

Hello,

I am trying to store permanently a authrole and authid when I auth a connection, I have a onChallenge method that send the secret (and the backend in Python sends a dict containing the new authid, and authrole).

Is there somewhere in the connection object or the session object, a field authrole, authid ?

Sorry, if it is mentioned somewhere, I am getting confused with Autobahn|JS doc, and latest releases, and I don’t really want to search for it in the source code.

Thanks in advance, and thanks for Autobahn !

0 Likes

#6

all details for the session (including the effectively assigned authid and authrole) are provided in the details argument of the onopen() callback

···

Am Sonntag, 12. März 2017 20:04:37 UTC+1 schrieb Andrzej Broński:

Did you find solution to your question? I am looking for same thing.

0 Likes

#7

Do you know why in documentation there is no mention about details argument?

W dniu poniedziałek, 13 marca 2017 13:06:50 UTC+1 użytkownik Tobias Oberstein napisał:

···

all details for the session (including the effectively assigned authid and authrole) are provided in the details argument of the onopen() callback

Am Sonntag, 12. März 2017 20:04:37 UTC+1 schrieb Andrzej Broński:

Did you find solution to your question? I am looking for same thing.

0 Likes

#8

Documentation on site is outdated, but actual version can be found on github.

W dniu poniedziałek, 13 marca 2017 13:40:47 UTC+1 użytkownik Andrzej Broński napisał:

···

Do you know why in documentation there is no mention about details argument?

W dniu poniedziałek, 13 marca 2017 13:06:50 UTC+1 użytkownik Tobias Oberstein napisał:

all details for the session (including the effectively assigned authid and authrole) are provided in the details argument of the onopen() callback

Am Sonntag, 12. März 2017 20:04:37 UTC+1 schrieb Andrzej Broński:

Did you find solution to your question? I am looking for same thing.

0 Likes