koa-js 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/vendor/assets/javascripts/koa/koa-user.js +5 -6
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 04f166d07e0353e61dd726de2645d1e2be88a69c
|
4
|
+
data.tar.gz: babcf9ecc4f9453945771b142d7a9c7f1407a4e5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fa850949acc195b182e90a2be7199197255c8f9e3e3d94ffd3054d7cd6251729bafd370cecc9d248a622862e58ddf288965124578f17bd0d8529b6e6d9717132
|
7
|
+
data.tar.gz: 385f77815758d96d8bad6c00e10a9c85baab1a9c1fd20739cd28175e66423ebcfaaf8148456afdea4b9bb8b9c433a4a828e158dd5f10d022673934994ed4927e
|
@@ -1,6 +1,7 @@
|
|
1
1
|
var KOAUser = KOAModel.extend({
|
2
2
|
klass: {
|
3
3
|
callbacks: [],
|
4
|
+
use_signature: true,
|
4
5
|
getting_user: false,
|
5
6
|
map: {
|
6
7
|
firstName: "first_name",
|
@@ -76,7 +77,7 @@ var KOAUser = KOAModel.extend({
|
|
76
77
|
if(callback) return callback(err);
|
77
78
|
return;
|
78
79
|
}
|
79
|
-
_this.
|
80
|
+
_this.synthesize(user);
|
80
81
|
if(callback) callback(null, _this);
|
81
82
|
});
|
82
83
|
},
|
@@ -97,7 +98,7 @@ var KOAUser = KOAModel.extend({
|
|
97
98
|
|
98
99
|
login: function(cb) {
|
99
100
|
var _this = this;
|
100
|
-
if(location.href.match(/https/i)) {
|
101
|
+
if(location.href.match(/https/i) && this.constructor.use_signature) {
|
101
102
|
cards.kik.sign("login", function(signedData, username, host) {
|
102
103
|
if(!signedData) {
|
103
104
|
cb("Failed to sign data");
|
@@ -107,8 +108,7 @@ var KOAUser = KOAModel.extend({
|
|
107
108
|
if(err) {
|
108
109
|
return cb(err);
|
109
110
|
}
|
110
|
-
_this.
|
111
|
-
_this.token = user.token;
|
111
|
+
_this.synthesize(user);
|
112
112
|
cb(null, _this);
|
113
113
|
});
|
114
114
|
});
|
@@ -117,8 +117,7 @@ var KOAUser = KOAModel.extend({
|
|
117
117
|
if(err) {
|
118
118
|
return cb(err);
|
119
119
|
}
|
120
|
-
_this.
|
121
|
-
_this.token = user.token;
|
120
|
+
_this.synthesize(user);
|
122
121
|
cb(null, _this);
|
123
122
|
});
|
124
123
|
}
|