Permalink
Browse files

Merge pull request #250 from Kolyunya/send-extra-data-while-atuhentic…

…ation

Send extra data while authentication
  • Loading branch information...
2 parents 352c593 + 46ba06b commit 3976650fcc426346055430142cfa3be460aba18c @oberstet oberstet committed on GitHub Jan 11, 2017
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 3976650

Please sign in to comment.