Update to Strophe 1.2.8 and add support for SASL-EXTERNAL auth
This commit is contained in:
parent
600f98afcb
commit
713922a9e1
@ -15,7 +15,6 @@
|
|||||||
"bootstrap": "~3.2.0",
|
"bootstrap": "~3.2.0",
|
||||||
"fontawesome": "~4.1.0",
|
"fontawesome": "~4.1.0",
|
||||||
"typeahead.js": "https://raw.githubusercontent.com/jcbrand/typeahead.js/eedfb10505dd3a20123d1fafc07c1352d83f0ab3/dist/typeahead.jquery.js",
|
"typeahead.js": "https://raw.githubusercontent.com/jcbrand/typeahead.js/eedfb10505dd3a20123d1fafc07c1352d83f0ab3/dist/typeahead.jquery.js",
|
||||||
"strophejs": "1.2.7",
|
|
||||||
"strophejs-plugins": "https://github.com/strophe/strophejs-plugins.git#amd",
|
"strophejs-plugins": "https://github.com/strophe/strophejs-plugins.git#amd",
|
||||||
"bourbon": "~4.2.6"
|
"bourbon": "~4.2.6"
|
||||||
},
|
},
|
||||||
|
18
config.js
18
config.js
@ -25,15 +25,15 @@ require.config({
|
|||||||
"jquery.easing": "components/jquery-easing-original/index", // XXX: Only required for https://conversejs.org website
|
"jquery.easing": "components/jquery-easing-original/index", // XXX: Only required for https://conversejs.org website
|
||||||
"moment": "node_modules/moment/moment",
|
"moment": "node_modules/moment/moment",
|
||||||
"pluggable": "node_modules/pluggable.js/pluggable",
|
"pluggable": "node_modules/pluggable.js/pluggable",
|
||||||
"strophe": "components/strophejs/src/wrapper",
|
"strophe": "node_modules/strophe.js/src/wrapper",
|
||||||
"strophe-base64": "components/strophejs/src/base64",
|
"strophe-base64": "node_modules/strophe.js/src/base64",
|
||||||
"strophe-bosh": "components/strophejs/src/bosh",
|
"strophe-bosh": "node_modules/strophe.js/src/bosh",
|
||||||
"strophe-core": "components/strophejs/src/core",
|
"strophe-core": "node_modules/strophe.js/src/core",
|
||||||
"strophe-md5": "components/strophejs/src/md5",
|
"strophe-md5": "node_modules/strophe.js/src/md5",
|
||||||
"strophe-polyfill": "components/strophejs/src/polyfills",
|
"strophe-polyfill": "node_modules/strophe.js/src/polyfills",
|
||||||
"strophe-sha1": "components/strophejs/src/sha1",
|
"strophe-sha1": "node_modules/strophe.js/src/sha1",
|
||||||
"strophe-utils": "components/strophejs/src/utils",
|
"strophe-utils": "node_modules/strophe.js/src/utils",
|
||||||
"strophe-websocket": "components/strophejs/src/websocket",
|
"strophe-websocket": "node_modules/strophe.js/src/websocket",
|
||||||
"strophe.disco": "components/strophejs-plugins/disco/strophe.disco",
|
"strophe.disco": "components/strophejs-plugins/disco/strophe.disco",
|
||||||
"strophe.ping": "src/strophe.ping",
|
"strophe.ping": "src/strophe.ping",
|
||||||
"strophe.rsm": "components/strophejs-plugins/rsm/strophe.rsm",
|
"strophe.rsm": "components/strophejs-plugins/rsm/strophe.rsm",
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
- Hardcode the storage for roster contacts and chatroom occupants to `sessionStorage`. [jcbrand]
|
- Hardcode the storage for roster contacts and chatroom occupants to `sessionStorage`. [jcbrand]
|
||||||
- Fixed wrong chat state value, should be `chat`, not `chatty`.
|
- Fixed wrong chat state value, should be `chat`, not `chatty`.
|
||||||
See [RFC 3921](https://xmpp.org/rfcs/rfc3921.html#rfc.section.2.1.2.2). [jcbrand]
|
See [RFC 3921](https://xmpp.org/rfcs/rfc3921.html#rfc.section.2.1.2.2). [jcbrand]
|
||||||
|
- Adds support for SASL-EXTERNAL. [jcbrand]
|
||||||
|
|
||||||
## 1.0.6 (2016-08-12)
|
## 1.0.6 (2016-08-12)
|
||||||
- #632 Offline and Logout states do not properly update once users start
|
- #632 Offline and Logout states do not properly update once users start
|
||||||
|
17
package.json
17
package.json
@ -45,18 +45,19 @@
|
|||||||
"po2json": "^0.3.0"
|
"po2json": "^0.3.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"requirejs": "~2.2.0",
|
"almond": "~0.3.1",
|
||||||
"pluggable.js": "0.0.2",
|
|
||||||
"jquery": "1.12.3",
|
|
||||||
"jed": "0.5.4",
|
|
||||||
"underscore": "~1.8.3",
|
|
||||||
"backbone": "1.1.2",
|
"backbone": "1.1.2",
|
||||||
"backbone.browserStorage": "0.0.3",
|
"backbone.browserStorage": "0.0.3",
|
||||||
"backbone.overview": "0.0.2",
|
"backbone.overview": "0.0.2",
|
||||||
"otr": "0.2.16",
|
|
||||||
"crypto-js-evanvosberg": "https://github.com/evanvosberg/crypto-js.git#release-3.1.2-5",
|
"crypto-js-evanvosberg": "https://github.com/evanvosberg/crypto-js.git#release-3.1.2-5",
|
||||||
"almond": "~0.3.1",
|
"jed": "0.5.4",
|
||||||
|
"jquery": "1.12.3",
|
||||||
|
"jquery.browser": ">=0.1.0",
|
||||||
"moment": "~2.12.0",
|
"moment": "~2.12.0",
|
||||||
"jquery.browser": ">=0.1.0"
|
"otr": "0.2.16",
|
||||||
|
"pluggable.js": "0.0.2",
|
||||||
|
"requirejs": "~2.2.0",
|
||||||
|
"strophe.js": "1.2.8",
|
||||||
|
"underscore": "~1.8.3"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -368,8 +368,9 @@
|
|||||||
initialize: function (cfg) {
|
initialize: function (cfg) {
|
||||||
cfg.$parent.html(this.$el.html(
|
cfg.$parent.html(this.$el.html(
|
||||||
converse.templates.login_panel({
|
converse.templates.login_panel({
|
||||||
'LOGIN': converse.LOGIN,
|
|
||||||
'ANONYMOUS': converse.ANONYMOUS,
|
'ANONYMOUS': converse.ANONYMOUS,
|
||||||
|
'EXTERNAL': converse.EXTERNAL,
|
||||||
|
'LOGIN': converse.LOGIN,
|
||||||
'PREBIND': converse.PREBIND,
|
'PREBIND': converse.PREBIND,
|
||||||
'auto_login': converse.auto_login,
|
'auto_login': converse.auto_login,
|
||||||
'authentication': converse.authentication,
|
'authentication': converse.authentication,
|
||||||
@ -406,11 +407,11 @@
|
|||||||
password = $pw_input.val(),
|
password = $pw_input.val(),
|
||||||
errors = false;
|
errors = false;
|
||||||
|
|
||||||
if (! jid) {
|
if (!jid) {
|
||||||
errors = true;
|
errors = true;
|
||||||
$jid_input.addClass('error');
|
$jid_input.addClass('error');
|
||||||
}
|
}
|
||||||
if (! password) {
|
if (!password && converse.authentication !== converse.EXTERNAL) {
|
||||||
errors = true;
|
errors = true;
|
||||||
$pw_input.addClass('error');
|
$pw_input.addClass('error');
|
||||||
}
|
}
|
||||||
|
@ -94,12 +94,13 @@
|
|||||||
'chat': 1, // We currently don't differentiate between "chat" and "online"
|
'chat': 1, // We currently don't differentiate between "chat" and "online"
|
||||||
'online': 1
|
'online': 1
|
||||||
};
|
};
|
||||||
|
converse.ANONYMOUS = "anonymous";
|
||||||
|
converse.CLOSED = 'closed';
|
||||||
|
converse.EXTERNAL = "external";
|
||||||
converse.LOGIN = "login";
|
converse.LOGIN = "login";
|
||||||
converse.LOGOUT = "logout";
|
converse.LOGOUT = "logout";
|
||||||
converse.ANONYMOUS = "anonymous";
|
|
||||||
converse.PREBIND = "prebind";
|
|
||||||
converse.OPENED = 'opened';
|
converse.OPENED = 'opened';
|
||||||
converse.CLOSED = 'closed';
|
converse.PREBIND = "prebind";
|
||||||
|
|
||||||
var PRETTY_CONNECTION_STATUS = {
|
var PRETTY_CONNECTION_STATUS = {
|
||||||
0: 'ERROR',
|
0: 'ERROR',
|
||||||
@ -214,7 +215,7 @@
|
|||||||
this.default_settings = {
|
this.default_settings = {
|
||||||
allow_contact_requests: true,
|
allow_contact_requests: true,
|
||||||
animate: true,
|
animate: true,
|
||||||
authentication: 'login', // Available values are "login", "prebind", "anonymous".
|
authentication: 'login', // Available values are "login", "prebind", "anonymous" and "external".
|
||||||
auto_away: 0, // Seconds after which user status is set to 'away'
|
auto_away: 0, // Seconds after which user status is set to 'away'
|
||||||
auto_login: false, // Currently only used in connection with anonymous login
|
auto_login: false, // Currently only used in connection with anonymous login
|
||||||
auto_reconnect: false,
|
auto_reconnect: false,
|
||||||
|
@ -3,11 +3,13 @@
|
|||||||
<span class="spinner login-submit"/>
|
<span class="spinner login-submit"/>
|
||||||
{[ } ]}
|
{[ } ]}
|
||||||
{[ if (!auto_login) { ]}
|
{[ if (!auto_login) { ]}
|
||||||
{[ if (authentication == LOGIN) { ]}
|
{[ if (authentication == LOGIN || authentication == EXTERNAL) { ]}
|
||||||
<label>{{label_username}}</label>
|
<label>{{label_username}}</label>
|
||||||
<input type="text" name="jid" placeholder="{{placeholder_username}}">
|
<input type="text" name="jid" placeholder="{{placeholder_username}}">
|
||||||
<label>{{label_password}}</label>
|
{[ if (authentication !== EXTERNAL) { ]}
|
||||||
<input type="password" name="password" placeholder="{{placeholder_password}}">
|
<label>{{label_password}}</label>
|
||||||
|
<input type="password" name="password" placeholder="{{placeholder_password}}">
|
||||||
|
{[ } ]}
|
||||||
<input class="pure-button button-primary" type="submit" value="{{label_login}}">
|
<input class="pure-button button-primary" type="submit" value="{{label_login}}">
|
||||||
<span class="conn-feedback"></span>
|
<span class="conn-feedback"></span>
|
||||||
{[ } ]}
|
{[ } ]}
|
||||||
|
Loading…
Reference in New Issue
Block a user