What is the AutobahnJS realm for?
Asked Answered
R

1

8

Just wondering what the mysterious realm field in AutobahnJS is. From the docs, creating a connection is as follows:

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

I don't set a realm server-side so what is this realm parameter for? Furthermore, it is a required field which must mean it is necessary for the connection to work. Can someone enlighten us on this?

Rammer answered 2/6, 2014 at 8:41 Comment(0)
B
5

A Realm is a WAMP routing and administrative domain (optionally) protected by authentication and authorization. (see https://wamp-proto.org/_static/gen/wamp_latest.html#realms-sessions-and-transports).

A single WAMP router can manage multiple realms. Hence, the realm is required to establish a session, as the server URL alone is not sufficient to know which realm to attach the session to.

PS: The AutobahnJS docs should talk about this .. needs improvement.

Benge answered 2/6, 2014 at 9:27 Comment(2)
The link is broken.Hijoung
fix the URL: wamp-proto.org/_static/gen/… :)Karlene

© 2022 - 2024 — McMap. All rights reserved.