Skip to content

Commit

Permalink
v4.3.19
Browse files Browse the repository at this point in the history
  • Loading branch information
jondubois committed Jun 20, 2016
1 parent 31f13f4 commit d154966
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "socketcluster-client",
"main": "socketcluster.js",
"version": "4.3.18",
"version": "4.3.19",
"homepage": "https://github.com/SocketCluster/socketcluster-client",
"description": "SocketCluster JavaScript client",
"authors": [
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "socketcluster-client",
"description": "SocketCluster JavaScript client",
"version": "4.3.18",
"version": "4.3.19",
"homepage": "http://socketcluster.io",
"contributors": [
{
Expand Down
9 changes: 6 additions & 3 deletions socketcluster.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ module.exports.destroy = function (options) {
return SCSocketCreator.destroy(options);
};

module.exports.version = '4.3.18';
module.exports.version = '4.3.19';

},{"./lib/scsocket":4,"./lib/scsocketcreator":5,"sc-emitter":12}],2:[function(require,module,exports){
(function (global){
Expand Down Expand Up @@ -472,15 +472,17 @@ SCSocket.prototype._changeToUnauthenticatedState = function () {
if (oldState == this.AUTHENTICATED) {
SCEmitter.prototype.emit.call(this, 'deauthenticate');
}
SCEmitter.prototype.emit.call(this, 'authTokenChange', this.signedAuthToken);
}
};

SCSocket.prototype._changeToAuthenticatedState = function (signedAuthToken) {
this.signedAuthToken = signedAuthToken;
this.authToken = this._extractAuthTokenData(signedAuthToken);

if (this.authState != this.AUTHENTICATED) {
var oldState = this.authState;
this.authState = this.AUTHENTICATED;
this.signedAuthToken = signedAuthToken;
this.authToken = this._extractAuthTokenData(signedAuthToken);
var stateChangeData = {
oldState: oldState,
newState: this.authState,
Expand All @@ -492,6 +494,7 @@ SCSocket.prototype._changeToAuthenticatedState = function (signedAuthToken) {
SCEmitter.prototype.emit.call(this, 'authStateChange', stateChangeData);
SCEmitter.prototype.emit.call(this, 'authenticate', signedAuthToken);
}
SCEmitter.prototype.emit.call(this, 'authTokenChange', signedAuthToken);
};

SCSocket.prototype.decodeBase64 = function (encodedString) {
Expand Down
6 changes: 3 additions & 3 deletions socketcluster.min.js

Large diffs are not rendered by default.

0 comments on commit d154966

Please sign in to comment.