Why does the autobahn belong?

Just wondering what the mysterious realm field is in AutobahnJS. A connection is created in the documents as follows:

 var connection = new autobahn.Connection({ url: 'ws://127.0.0.1:9000/', realm: 'realm1' }); 

I do not install the server side of realm, so what is the parameter of this realm? In addition, this is a required field, which should mean that the connection should work. Can someone enlighten us on this?

+6
source share
1 answer

A Realm is a WMP routing and administrative domain (optional), protected by authentication and authorization. (see https://github.com/tavendo/WAMP/blob/master/spec/basic.md#realms-sessions-and-transports ).

A single WAMP router can manage multiple areas. Therefore, realm is required to establish a session, since only one server URL is not enough to know which area to join the session to.

PS: AutobahnJS docs should talk about it .. needs to be improved.

+4
source

Source: https://habr.com/ru/post/970165/


All Articles