Is it possible to change authid in a session?



When connecting to a crossbar server for example anonymously (WAMP-anonymous) you specify a realm and a crossbar url. Next your session_id for example 123456789 gets assigned a role and a random authid which is a UUID.

Now my question is, is it possible to ask crossbar to change your authid on the fly to something else?

This is a duplicate of




You can use a dynamic authenticator to set the authid when establishing the connection, but I don’t think you can change it once the connection has been established (that would be a problem on many levels). I don’t believe it’s possible to set the authid for an anonymous connection. You’ll need to use ticket or wampcra.


Andrew Eddie.



No. A WAMP Session has a single authid and authrole assigned once during authentication. Deciding on “anonymous” is authentication. So, the only way to change your authid or role is to start a new session. Technically, it is possible to start a new session on the same transport (but I don’t think there are “nice” APIs for this – and in any case, you’ll get e.g. a new session-id in any case).