Permalink
Browse files

Send extra data while authentication

  • Loading branch information...
1 parent 352c593 commit 46ba06bd4dd6425d3a2f40ebf7212ac4b3799eaf @Kolyunya Kolyunya committed Dec 7, 2016
Showing with 5 additions and 2 deletions.
  1. +1 −1 lib/connection.js
  2. +4 −1 lib/session.js
View
@@ -308,7 +308,7 @@ Connection.prototype.open = function () {
self._connect_successes += 1;
// start WAMP session
- self._session.join(self._options.realm, self._options.authmethods, self._options.authid);
+ self._session.join(self._options.realm, self._options.authmethods, self._options.authid, self._options.authextra);
};
self._session.onjoin = function (details) {
View
@@ -1131,7 +1131,7 @@ Session.prototype.log = function () {
};
-Session.prototype.join = function (realm, authmethods, authid) {
+Session.prototype.join = function (realm, authmethods, authid, authextra) {
util.assert(typeof realm === 'string', "Session.join: <realm> must be a string");
util.assert(!authmethods || Array.isArray(authmethods), "Session.join: <authmethods> must be an array []");
@@ -1155,6 +1155,9 @@ Session.prototype.join = function (realm, authmethods, authid) {
if (authid) {
details.authid = authid;
}
+ if (authextra) {
+ details.authextra = authextra;
+ }
var msg = [MSG_TYPE.HELLO, realm, details];
self._send_wamp(msg);

0 comments on commit 46ba06b

Please sign in to comment.