javascriptautobahncrossbarwamp-protocol

How to specify the client's role/AuthID when connected to Crossbar router server with AutobahnJS client?


I have set up a crossbar router server with several roles and each role has different register/call/subscribe/publish permissions.
Then I use the AutobahnJS client connect to the router. But I have no idea how to specify the client role(or AuthID by which the router determine the role of my client?) after searching the API Reference page . Does anybody has any clue about this?

(P.S. The default 'anonymous' role is OK.)


Solution

  • You need to use an authentication mechanism when you want to specify a role other than anonymous. Authentication is described in the Crossbar.io documentation - see http://crossbar.io/docs/Authentication/. (Note: the documentation should be correct in what it describes, but a new, improved authentication scheme which is intended to replace WAMP-CRA, as well as client-TLS-cert based authentication are in trunk, but not yet documented).