ember_simple_auth-rails 0.5.2 → 0.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/ember_simple_auth/rails/version.rb +1 -1
- data/vendor/assets/javascripts/ember-simple-auth-cookie-store.js +16 -15
- data/vendor/assets/javascripts/ember-simple-auth-devise.js +27 -24
- data/vendor/assets/javascripts/ember-simple-auth-oauth2.js +27 -24
- data/vendor/assets/javascripts/ember-simple-auth.js +208 -252
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 73f2d4ad8f745292a30ac576c6db894f387c276d
|
4
|
+
data.tar.gz: 38b0fe4355b5d8ccd9b3801512800bdaf331131f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c35fb4d3f62dbaa128ff332f38260def9215f99db29e1d636ee689c438c56c05abc5862501d229c41041ba0d6b1ab74c22bdf381b08de02f6f3a030750f570ba
|
7
|
+
data.tar.gz: bf9eff7b02ccc43b52a701fbaed86fa2c9e63e07d3ecc1dc2b13098b85e096c4778442fa421ee9c5a7e9d02b0b8057d30641ecdde0374adc288c5753b95fb692
|
@@ -54,18 +54,13 @@ var define, requireModule;
|
|
54
54
|
requireModule.registry = registry;
|
55
55
|
})();
|
56
56
|
|
57
|
-
define("ember-simple-auth-cookie-store",
|
58
|
-
["./ember-simple-auth-cookie-store/stores/cookie","exports"],
|
59
|
-
function(__dependency1__, __exports__) {
|
60
|
-
"use strict";
|
61
|
-
var Cookie = __dependency1__.Cookie;
|
62
|
-
|
63
|
-
__exports__["default"] = Cookie;
|
64
|
-
});
|
65
57
|
define("ember-simple-auth-cookie-store/stores/cookie",
|
66
|
-
["exports"],
|
67
|
-
function(__exports__) {
|
58
|
+
["ember-simple-auth/stores/base","ember-simple-auth/utils/flat_objects_are_equal","exports"],
|
59
|
+
function(__dependency1__, __dependency2__, __exports__) {
|
68
60
|
"use strict";
|
61
|
+
var Base = __dependency1__["default"];
|
62
|
+
var flatObjectsAreEqual = __dependency2__["default"];
|
63
|
+
|
69
64
|
var global = (typeof window !== 'undefined') ? window : {},
|
70
65
|
Ember = global.Ember;
|
71
66
|
|
@@ -86,7 +81,7 @@ define("ember-simple-auth-cookie-store/stores/cookie",
|
|
86
81
|
@namespace Stores
|
87
82
|
@extends Stores.Base
|
88
83
|
*/
|
89
|
-
|
84
|
+
__exports__["default"] = Base.extend({
|
90
85
|
/**
|
91
86
|
The prefix to use for the store's cookie names so they can be distinguished
|
92
87
|
from other cookies.
|
@@ -201,7 +196,7 @@ define("ember-simple-auth-cookie-store/stores/cookie",
|
|
201
196
|
*/
|
202
197
|
syncData: function() {
|
203
198
|
var data = this.restore();
|
204
|
-
if (!
|
199
|
+
if (!flatObjectsAreEqual(data, this._lastData)) {
|
205
200
|
this._lastData = data;
|
206
201
|
this.trigger('sessionDataUpdated', data);
|
207
202
|
}
|
@@ -211,10 +206,16 @@ define("ember-simple-auth-cookie-store/stores/cookie",
|
|
211
206
|
}
|
212
207
|
}
|
213
208
|
});
|
214
|
-
|
215
|
-
__exports__.Cookie = Cookie;
|
216
209
|
});
|
217
|
-
|
210
|
+
define('ember-simple-auth/stores/base', ['exports'], function(__exports__) {
|
211
|
+
__exports__['default'] = global.Ember.SimpleAuth.Stores.Base;
|
212
|
+
});
|
213
|
+
define('ember-simple-auth/utils/flat_objects_are_equal', ['exports'], function(__exports__) {
|
214
|
+
__exports__['default'] = global.Ember.SimpleAuth.Utils.flatObjectsAreEqual;
|
215
|
+
});
|
216
|
+
|
217
|
+
var Cookie = requireModule('ember-simple-auth-cookie-store/stores/cookie').default;
|
218
|
+
global.Ember.SimpleAuth.Stores.Cookie = Cookie;
|
218
219
|
|
219
220
|
global.Ember.SimpleAuth.initializeExtension(function(container, application, options) {
|
220
221
|
container.register('ember-simple-auth-session-store:cookie', global.Ember.SimpleAuth.Stores.Cookie);
|
@@ -54,20 +54,13 @@ var define, requireModule;
|
|
54
54
|
requireModule.registry = registry;
|
55
55
|
})();
|
56
56
|
|
57
|
-
define("ember-simple-auth-devise",
|
58
|
-
["
|
57
|
+
define("ember-simple-auth-devise/authenticators/devise",
|
58
|
+
["ember-simple-auth/authenticators/base","ember-simple-auth/utils/is_secure_url","exports"],
|
59
59
|
function(__dependency1__, __dependency2__, __exports__) {
|
60
60
|
"use strict";
|
61
|
-
var
|
62
|
-
var
|
61
|
+
var Base = __dependency1__["default"];
|
62
|
+
var isSecureUrl = __dependency2__["default"];
|
63
63
|
|
64
|
-
__exports__.Authenticator = Authenticator;
|
65
|
-
__exports__.Authorizer = Authorizer;
|
66
|
-
});
|
67
|
-
define("ember-simple-auth-devise/authenticators/devise",
|
68
|
-
["exports"],
|
69
|
-
function(__exports__) {
|
70
|
-
"use strict";
|
71
64
|
var global = (typeof window !== 'undefined') ? window : {},
|
72
65
|
Ember = global.Ember;
|
73
66
|
|
@@ -87,7 +80,7 @@ define("ember-simple-auth-devise/authenticators/devise",
|
|
87
80
|
@namespace Authenticators
|
88
81
|
@extends Base
|
89
82
|
*/
|
90
|
-
|
83
|
+
__exports__["default"] = Base.extend({
|
91
84
|
/**
|
92
85
|
The endpoint on the server the authenticator acquires the auth token
|
93
86
|
and email from.
|
@@ -173,7 +166,7 @@ define("ember-simple-auth-devise/authenticators/devise",
|
|
173
166
|
@private
|
174
167
|
*/
|
175
168
|
makeRequest: function(data, resolve, reject) {
|
176
|
-
if (!
|
169
|
+
if (!isSecureUrl(this.serverTokenEndpoint)) {
|
177
170
|
Ember.Logger.warn('Credentials are transmitted via an insecure connection - use HTTPS to keep them secure.');
|
178
171
|
}
|
179
172
|
return Ember.$.ajax({
|
@@ -187,13 +180,14 @@ define("ember-simple-auth-devise/authenticators/devise",
|
|
187
180
|
});
|
188
181
|
}
|
189
182
|
});
|
190
|
-
|
191
|
-
__exports__.Devise = Devise;
|
192
183
|
});
|
193
184
|
define("ember-simple-auth-devise/authorizers/devise",
|
194
|
-
["exports"],
|
195
|
-
function(__exports__) {
|
185
|
+
["ember-simple-auth/authorizers/base","ember-simple-auth/utils/is_secure_url","exports"],
|
186
|
+
function(__dependency1__, __dependency2__, __exports__) {
|
196
187
|
"use strict";
|
188
|
+
var Base = __dependency1__["default"];
|
189
|
+
var isSecureUrl = __dependency2__["default"];
|
190
|
+
|
197
191
|
var global = (typeof window !== 'undefined') ? window : {},
|
198
192
|
Ember = global.Ember;
|
199
193
|
|
@@ -213,7 +207,7 @@ define("ember-simple-auth-devise/authorizers/devise",
|
|
213
207
|
@namespace Authorizers
|
214
208
|
@extends Base
|
215
209
|
*/
|
216
|
-
|
210
|
+
__exports__["default"] = Base.extend({
|
217
211
|
/**
|
218
212
|
Authorizes an XHR request by sending the `user_token` and `user_email`
|
219
213
|
properties from the session in the `Authorization` header:
|
@@ -231,7 +225,7 @@ define("ember-simple-auth-devise/authorizers/devise",
|
|
231
225
|
var userToken = this.get('session.user_token');
|
232
226
|
var userEmail = this.get('session.user_email');
|
233
227
|
if (this.get('session.isAuthenticated') && !Ember.isEmpty(userToken) && !Ember.isEmpty(userEmail)) {
|
234
|
-
if (!
|
228
|
+
if (!isSecureUrl(requestOptions.url)) {
|
235
229
|
Ember.Logger.warn('Credentials are transmitted via an insecure connection - use HTTPS to keep them secure.');
|
236
230
|
}
|
237
231
|
var authData = 'token="' + userToken + '", user_email="' + userEmail + '"';
|
@@ -239,13 +233,22 @@ define("ember-simple-auth-devise/authorizers/devise",
|
|
239
233
|
}
|
240
234
|
}
|
241
235
|
});
|
242
|
-
|
243
|
-
__exports__.Devise = Devise;
|
244
236
|
});
|
245
|
-
|
237
|
+
define('ember-simple-auth/authenticators/base', ['exports'], function(__exports__) {
|
238
|
+
__exports__['default'] = global.Ember.SimpleAuth.Authenticators.Base;
|
239
|
+
});
|
240
|
+
define('ember-simple-auth/authorizers/base', ['exports'], function(__exports__) {
|
241
|
+
__exports__['default'] = global.Ember.SimpleAuth.Authorizers.Base;
|
242
|
+
});
|
243
|
+
define('ember-simple-auth/utils/is_secure_url', ['exports'], function(__exports__) {
|
244
|
+
__exports__['default'] = global.Ember.SimpleAuth.Utils.isSecureUrl;
|
245
|
+
});
|
246
|
+
|
247
|
+
var Authenticator = requireModule('ember-simple-auth-devise/authenticators/devise').default;
|
248
|
+
var Authorizer = requireModule('ember-simple-auth-devise/authorizers/devise').default;
|
246
249
|
|
247
|
-
global.Ember.SimpleAuth.Authenticators.Devise =
|
248
|
-
global.Ember.SimpleAuth.Authorizers.Devise =
|
250
|
+
global.Ember.SimpleAuth.Authenticators.Devise = Authenticator;
|
251
|
+
global.Ember.SimpleAuth.Authorizers.Devise = Authorizer;
|
249
252
|
|
250
253
|
global.Ember.SimpleAuth.initializeExtension(function(container, application, options) {
|
251
254
|
container.register('ember-simple-auth-authorizer:devise', global.Ember.SimpleAuth.Authorizers.Devise);
|
@@ -54,20 +54,13 @@ var define, requireModule;
|
|
54
54
|
requireModule.registry = registry;
|
55
55
|
})();
|
56
56
|
|
57
|
-
define("ember-simple-auth-oauth2",
|
58
|
-
["
|
57
|
+
define("ember-simple-auth-oauth2/authenticators/oauth2",
|
58
|
+
["ember-simple-auth/authenticators/base","ember-simple-auth/utils/is_secure_url","exports"],
|
59
59
|
function(__dependency1__, __dependency2__, __exports__) {
|
60
60
|
"use strict";
|
61
|
-
var
|
62
|
-
var
|
61
|
+
var Base = __dependency1__["default"];
|
62
|
+
var isSecureUrl = __dependency2__["default"];
|
63
63
|
|
64
|
-
__exports__.Authenticator = Authenticator;
|
65
|
-
__exports__.Authorizer = Authorizer;
|
66
|
-
});
|
67
|
-
define("ember-simple-auth-oauth2/authenticators/oauth2",
|
68
|
-
["exports"],
|
69
|
-
function(__exports__) {
|
70
|
-
"use strict";
|
71
64
|
var global = (typeof window !== 'undefined') ? window : {},
|
72
65
|
Ember = global.Ember;
|
73
66
|
|
@@ -87,7 +80,7 @@ define("ember-simple-auth-oauth2/authenticators/oauth2",
|
|
87
80
|
@namespace Authenticators
|
88
81
|
@extends Base
|
89
82
|
*/
|
90
|
-
|
83
|
+
__exports__["default"] = Base.extend({
|
91
84
|
/**
|
92
85
|
Triggered when the authenticator refreshes the access token (see
|
93
86
|
[RFC 6740, section 6](http://tools.ietf.org/html/rfc6749#section-6)).
|
@@ -223,7 +216,7 @@ define("ember-simple-auth-oauth2/authenticators/oauth2",
|
|
223
216
|
@protected
|
224
217
|
*/
|
225
218
|
makeRequest: function(data) {
|
226
|
-
if (!
|
219
|
+
if (!isSecureUrl(this.serverTokenEndpoint)) {
|
227
220
|
Ember.Logger.warn('Credentials are transmitted via an insecure connection - use HTTPS to keep them secure.');
|
228
221
|
}
|
229
222
|
return Ember.$.ajax({
|
@@ -292,13 +285,14 @@ define("ember-simple-auth-oauth2/authenticators/oauth2",
|
|
292
285
|
}
|
293
286
|
}
|
294
287
|
});
|
295
|
-
|
296
|
-
__exports__.OAuth2 = OAuth2;
|
297
288
|
});
|
298
289
|
define("ember-simple-auth-oauth2/authorizers/oauth2",
|
299
|
-
["exports"],
|
300
|
-
function(__exports__) {
|
290
|
+
["ember-simple-auth/authorizers/base","ember-simple-auth/utils/is_secure_url","exports"],
|
291
|
+
function(__dependency1__, __dependency2__, __exports__) {
|
301
292
|
"use strict";
|
293
|
+
var Base = __dependency1__["default"];
|
294
|
+
var isSecureUrl = __dependency2__["default"];
|
295
|
+
|
302
296
|
var global = (typeof window !== 'undefined') ? window : {},
|
303
297
|
Ember = global.Ember;
|
304
298
|
|
@@ -315,7 +309,7 @@ define("ember-simple-auth-oauth2/authorizers/oauth2",
|
|
315
309
|
@namespace Authorizers
|
316
310
|
@extends Base
|
317
311
|
*/
|
318
|
-
|
312
|
+
__exports__["default"] = Base.extend({
|
319
313
|
/**
|
320
314
|
Authorizes an XHR request by sending the `access_token` property from the
|
321
315
|
session as a bearer token in the `Authorization` header:
|
@@ -331,20 +325,29 @@ define("ember-simple-auth-oauth2/authorizers/oauth2",
|
|
331
325
|
authorize: function(jqXHR, requestOptions) {
|
332
326
|
var accessToken = this.get('session.access_token');
|
333
327
|
if (this.get('session.isAuthenticated') && !Ember.isEmpty(accessToken)) {
|
334
|
-
if (!
|
328
|
+
if (!isSecureUrl(requestOptions.url)) {
|
335
329
|
Ember.Logger.warn('Credentials are transmitted via an insecure connection - use HTTPS to keep them secure.');
|
336
330
|
}
|
337
331
|
jqXHR.setRequestHeader('Authorization', 'Bearer ' + accessToken);
|
338
332
|
}
|
339
333
|
}
|
340
334
|
});
|
341
|
-
|
342
|
-
__exports__.OAuth2 = OAuth2;
|
343
335
|
});
|
344
|
-
|
336
|
+
define('ember-simple-auth/authenticators/base', ['exports'], function(__exports__) {
|
337
|
+
__exports__['default'] = global.Ember.SimpleAuth.Authenticators.Base;
|
338
|
+
});
|
339
|
+
define('ember-simple-auth/authorizers/base', ['exports'], function(__exports__) {
|
340
|
+
__exports__['default'] = global.Ember.SimpleAuth.Authorizers.Base;
|
341
|
+
});
|
342
|
+
define('ember-simple-auth/utils/is_secure_url', ['exports'], function(__exports__) {
|
343
|
+
__exports__['default'] = global.Ember.SimpleAuth.Utils.isSecureUrl;
|
344
|
+
});
|
345
|
+
|
346
|
+
var Authenticator = requireModule('ember-simple-auth-oauth2/authenticators/oauth2').default;
|
347
|
+
var Authorizer = requireModule('ember-simple-auth-oauth2/authorizers/oauth2').default;
|
345
348
|
|
346
|
-
global.Ember.SimpleAuth.Authenticators.OAuth2 =
|
347
|
-
global.Ember.SimpleAuth.Authorizers.OAuth2 =
|
349
|
+
global.Ember.SimpleAuth.Authenticators.OAuth2 = Authenticator;
|
350
|
+
global.Ember.SimpleAuth.Authorizers.OAuth2 = Authorizer;
|
348
351
|
|
349
352
|
global.Ember.SimpleAuth.initializeExtension(function(container, application, options) {
|
350
353
|
container.register('ember-simple-auth-authorizer:oauth2-bearer', global.Ember.SimpleAuth.Authorizers.OAuth2);
|
@@ -55,52 +55,14 @@ var define, requireModule;
|
|
55
55
|
})();
|
56
56
|
|
57
57
|
define("ember-simple-auth",
|
58
|
-
[
|
59
|
-
function(
|
58
|
+
[],
|
59
|
+
function() {
|
60
60
|
"use strict";
|
61
|
-
var setup = __dependency1__.setup;
|
62
|
-
var initializeExtension = __dependency1__.initializeExtension;
|
63
|
-
var Configuration = __dependency1__.Configuration;
|
64
|
-
var Session = __dependency2__.Session;
|
65
|
-
var Authenticators = __dependency3__.Authenticators;
|
66
|
-
var Authorizers = __dependency4__.Authorizers;
|
67
|
-
var Stores = __dependency5__.Stores;
|
68
|
-
var Utils = __dependency6__.Utils;
|
69
|
-
var ApplicationRouteMixin = __dependency7__.ApplicationRouteMixin;
|
70
|
-
var AuthenticatedRouteMixin = __dependency8__.AuthenticatedRouteMixin;
|
71
|
-
var AuthenticationControllerMixin = __dependency9__.AuthenticationControllerMixin;
|
72
|
-
var LoginControllerMixin = __dependency10__.LoginControllerMixin;
|
73
|
-
|
74
61
|
/**
|
75
62
|
Ember.SimpleAuth's main module.
|
76
63
|
|
77
64
|
@module Ember.SimpleAuth
|
78
65
|
*/
|
79
|
-
|
80
|
-
__exports__.setup = setup;
|
81
|
-
__exports__.initializeExtension = initializeExtension;
|
82
|
-
__exports__.Configuration = Configuration;
|
83
|
-
__exports__.Session = Session;
|
84
|
-
__exports__.Authenticators = Authenticators;
|
85
|
-
__exports__.Authorizers = Authorizers;
|
86
|
-
__exports__.Stores = Stores;
|
87
|
-
__exports__.Utils = Utils;
|
88
|
-
__exports__.ApplicationRouteMixin = ApplicationRouteMixin;
|
89
|
-
__exports__.AuthenticatedRouteMixin = AuthenticatedRouteMixin;
|
90
|
-
__exports__.AuthenticationControllerMixin = AuthenticationControllerMixin;
|
91
|
-
__exports__.LoginControllerMixin = LoginControllerMixin;
|
92
|
-
});
|
93
|
-
define("ember-simple-auth/authenticators",
|
94
|
-
["./authenticators/base","exports"],
|
95
|
-
function(__dependency1__, __exports__) {
|
96
|
-
"use strict";
|
97
|
-
var Base = __dependency1__.Base;
|
98
|
-
|
99
|
-
var Authenticators = {
|
100
|
-
Base: Base
|
101
|
-
};
|
102
|
-
|
103
|
-
__exports__.Authenticators = Authenticators;
|
104
66
|
});
|
105
67
|
define("ember-simple-auth/authenticators/base",
|
106
68
|
["exports"],
|
@@ -152,7 +114,7 @@ define("ember-simple-auth/authenticators/base",
|
|
152
114
|
@extends Ember.Object
|
153
115
|
@uses Ember.Evented
|
154
116
|
*/
|
155
|
-
|
117
|
+
__exports__["default"] = Ember.Object.extend(Ember.Evented, {
|
156
118
|
/**
|
157
119
|
__Triggered when the data that constitutes the session is updated by the
|
158
120
|
authenticator__. This might happen e.g. because the authenticator refreshes
|
@@ -245,20 +207,6 @@ define("ember-simple-auth/authenticators/base",
|
|
245
207
|
return new Ember.RSVP.resolve();
|
246
208
|
}
|
247
209
|
});
|
248
|
-
|
249
|
-
__exports__.Base = Base;
|
250
|
-
});
|
251
|
-
define("ember-simple-auth/authorizers",
|
252
|
-
["./authorizers/base","exports"],
|
253
|
-
function(__dependency1__, __exports__) {
|
254
|
-
"use strict";
|
255
|
-
var Base = __dependency1__.Base;
|
256
|
-
|
257
|
-
var Authorizers = {
|
258
|
-
Base: Base
|
259
|
-
};
|
260
|
-
|
261
|
-
__exports__.Authorizers = Authorizers;
|
262
210
|
});
|
263
211
|
define("ember-simple-auth/authorizers/base",
|
264
212
|
["exports"],
|
@@ -285,7 +233,7 @@ define("ember-simple-auth/authorizers/base",
|
|
285
233
|
@namespace Authorizers
|
286
234
|
@extends Ember.Object
|
287
235
|
*/
|
288
|
-
|
236
|
+
__exports__["default"] = Ember.Object.extend({
|
289
237
|
/**
|
290
238
|
The session the authorizer gets the data it needs to authorize requests
|
291
239
|
from (see [Ember.SimpleAuth.Session](#Ember-SimpleAuth-Session)).
|
@@ -311,51 +259,18 @@ define("ember-simple-auth/authorizers/base",
|
|
311
259
|
authorize: function(jqXHR, requestOptions) {
|
312
260
|
}
|
313
261
|
});
|
314
|
-
|
315
|
-
__exports__.Base = Base;
|
316
262
|
});
|
317
|
-
define("ember-simple-auth/
|
318
|
-
["
|
319
|
-
function(
|
263
|
+
define("ember-simple-auth/configuration",
|
264
|
+
["exports"],
|
265
|
+
function(__exports__) {
|
320
266
|
"use strict";
|
321
|
-
var Session = __dependency1__.Session;
|
322
|
-
var registerStores = __dependency2__.registerStores;
|
323
|
-
|
324
|
-
function extractLocationOrigin(location) {
|
325
|
-
if (Ember.typeOf(location) === 'string') {
|
326
|
-
var link = document.createElement('a');
|
327
|
-
link.href = location;
|
328
|
-
//IE requires the following line when url is relative.
|
329
|
-
//First assignment of relative url to link.href results in absolute url on link.href but link.hostname and other properties are not set
|
330
|
-
//Second assignment of absolute url to link.href results in link.hostname and other properties being set as expected
|
331
|
-
link.href = link.href;
|
332
|
-
location = link;
|
333
|
-
}
|
334
|
-
var port = location.port;
|
335
|
-
if (Ember.isEmpty(port)) {
|
336
|
-
//need to include the port whether its actually present or not as some versions of IE will always set it
|
337
|
-
port = location.protocol === 'http:' ? '80' : (location.protocol === 'https:' ? '443' : '');
|
338
|
-
}
|
339
|
-
return location.protocol + '//' + location.hostname + (port !== '' ? ':' + port : '');
|
340
|
-
}
|
341
|
-
|
342
|
-
var urlOrigins = {};
|
343
|
-
var documentOrigin = extractLocationOrigin(window.location);
|
344
|
-
var crossOriginWhitelist;
|
345
|
-
function shouldAuthorizeRequest(url) {
|
346
|
-
var urlOrigin = urlOrigins[url] = urlOrigins[url] || extractLocationOrigin(url);
|
347
|
-
return crossOriginWhitelist.indexOf(urlOrigin) > -1 || urlOrigin === documentOrigin;
|
348
|
-
}
|
349
|
-
|
350
|
-
var extensionInitializers = [];
|
351
|
-
|
352
267
|
/**
|
353
268
|
Ember.SimpleAuth's configuration object.
|
354
269
|
|
355
270
|
@class Configuration
|
356
271
|
@namespace $mainModule
|
357
272
|
*/
|
358
|
-
|
273
|
+
__exports__["default"] = {
|
359
274
|
/**
|
360
275
|
The route to transition to for authentication; should be set through
|
361
276
|
[Ember.SimpleAuth.setup](#Ember-SimpleAuth-setup).
|
@@ -399,84 +314,22 @@ define("ember-simple-auth/core",
|
|
399
314
|
@private
|
400
315
|
@type String
|
401
316
|
*/
|
402
|
-
applicationRootUrl: null
|
403
|
-
};
|
404
|
-
|
405
|
-
/**
|
406
|
-
Sets up Ember.SimpleAuth for the application; this method __should be invoked
|
407
|
-
in a custom initializer__ like this:
|
408
|
-
|
409
|
-
```javascript
|
410
|
-
Ember.Application.initializer({
|
411
|
-
name: 'authentication',
|
412
|
-
initialize: function(container, application) {
|
413
|
-
Ember.SimpleAuth.setup(container, application);
|
414
|
-
}
|
415
|
-
});
|
416
|
-
```
|
417
|
-
|
418
|
-
@method setup
|
419
|
-
@namespace $mainModule
|
420
|
-
@static
|
421
|
-
@param {Container} container The Ember.js application's dependency injection container
|
422
|
-
@param {Ember.Application} application The Ember.js application instance
|
423
|
-
@param {Object} options
|
424
|
-
@param {String} [options.authorizerFactory] The authorizer factory to use as it is registered with Ember's container, see [Ember's API docs](http://emberjs.com/api/classes/Ember.Application.html#method_register); when the application does not interact with a server that requires authorized requests, no auzthorizer is needed
|
425
|
-
@param {Object} [options.storeFactory] The store factory to use as it is registered with Ember's container, see [Ember's API docs](http://emberjs.com/api/classes/Ember.Application.html#method_register) - defaults to `session-stores:local-storage`
|
426
|
-
@param {Object} [options.sessionPropertyName] The name for the property that the session is injected with into routes and controllers - defaults to `session`
|
427
|
-
@param {String} [options.authenticationRoute] route to transition to for authentication - defaults to `'login'`
|
428
|
-
@param {String} [options.routeAfterAuthentication] route to transition to after successful authentication - defaults to `'index'`
|
429
|
-
@param {Array[String]} [options.crossOriginWhitelist] Ember.SimpleAuth will never authorize requests going to a different origin than the one the Ember.js application was loaded from; to explicitely enable authorization for additional origins, whitelist those origins - defaults to `[]` _(beware that origins consist of protocol, host and port (port can be left out when it is 80 for HTTP or 443 for HTTPS))_
|
430
|
-
**/
|
431
|
-
var setup = function(container, application, options) {
|
432
|
-
application.deferReadiness();
|
433
|
-
registerStores(container);
|
434
|
-
extensionInitializers.forEach(function(initializer) {
|
435
|
-
initializer(container, application, options);
|
436
|
-
});
|
317
|
+
applicationRootUrl: null,
|
437
318
|
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
});
|
446
|
-
|
447
|
-
options.storeFactory = options.storeFactory || 'ember-simple-auth-session-store:local-storage';
|
448
|
-
var store = container.lookup(options.storeFactory);
|
449
|
-
var session = Session.create({ store: store, container: container });
|
450
|
-
|
451
|
-
container.register('ember-simple-auth-session:main', session, { instantiate: false });
|
452
|
-
Ember.A(['controller', 'route']).forEach(function(component) {
|
453
|
-
container.injection(component, Configuration.sessionPropertyName, 'ember-simple-auth-session:main');
|
454
|
-
});
|
455
|
-
|
456
|
-
if (!Ember.isEmpty(options.authorizerFactory)) {
|
457
|
-
var authorizer = container.lookup(options.authorizerFactory);
|
458
|
-
if (!!authorizer) {
|
459
|
-
authorizer.set('session', session);
|
460
|
-
Ember.$.ajaxPrefilter(function(options, originalOptions, jqXHR) {
|
461
|
-
if (shouldAuthorizeRequest(options.url)) {
|
462
|
-
authorizer.authorize(jqXHR, options);
|
463
|
-
}
|
464
|
-
});
|
465
|
-
Ember.$(document).ajaxError(function(event, jqXHR, setting, exception) {
|
466
|
-
if (jqXHR.status === 401) {
|
467
|
-
session.trigger('authorizationFailed');
|
468
|
-
}
|
469
|
-
});
|
470
|
-
}
|
471
|
-
} else {
|
472
|
-
Ember.Logger.debug('No authorizer factory was specified for Ember.SimpleAuth - specify one if backend requests need to be authorized.');
|
473
|
-
}
|
474
|
-
|
475
|
-
var advanceReadiness = function() {
|
476
|
-
application.advanceReadiness();
|
477
|
-
};
|
478
|
-
session.restore().then(advanceReadiness, advanceReadiness);
|
319
|
+
/**
|
320
|
+
@property extensionInitializers
|
321
|
+
@static
|
322
|
+
@private
|
323
|
+
@type Array
|
324
|
+
*/
|
325
|
+
extensionInitializers: []
|
479
326
|
};
|
327
|
+
});
|
328
|
+
define("ember-simple-auth/initialize_extension",
|
329
|
+
["./configuration","exports"],
|
330
|
+
function(__dependency1__, __exports__) {
|
331
|
+
"use strict";
|
332
|
+
var Configuration = __dependency1__["default"];
|
480
333
|
|
481
334
|
/**
|
482
335
|
Registers an extension initializer to be invoked when
|
@@ -489,22 +342,18 @@ define("ember-simple-auth/core",
|
|
489
342
|
@static
|
490
343
|
@param {Function} initializer The initializer to be invoked when [Ember.SimpleAuth.setup](#Ember-SimpleAuth-setup) is invoked; this will receive the same arguments as [Ember.SimpleAuth.setup](#Ember-SimpleAuth-setup).
|
491
344
|
*/
|
492
|
-
|
493
|
-
extensionInitializers.push(initializer);
|
494
|
-
}
|
495
|
-
|
496
|
-
__exports__.setup = setup;
|
497
|
-
__exports__.initializeExtension = initializeExtension;
|
498
|
-
__exports__.Configuration = Configuration;
|
345
|
+
__exports__["default"] = function(initializer) {
|
346
|
+
Configuration.extensionInitializers.push(initializer);
|
347
|
+
}
|
499
348
|
});
|
500
349
|
define("ember-simple-auth/mixins/application_route_mixin",
|
501
|
-
["./../
|
350
|
+
["./../configuration","exports"],
|
502
351
|
function(__dependency1__, __exports__) {
|
503
352
|
"use strict";
|
504
353
|
var global = (typeof window !== 'undefined') ? window : {},
|
505
354
|
Ember = global.Ember;
|
506
355
|
|
507
|
-
var Configuration = __dependency1__
|
356
|
+
var Configuration = __dependency1__["default"];
|
508
357
|
|
509
358
|
/**
|
510
359
|
The mixin for the application route. This defines actions to authenticate the
|
@@ -544,7 +393,7 @@ define("ember-simple-auth/mixins/application_route_mixin",
|
|
544
393
|
@extends Ember.Mixin
|
545
394
|
@static
|
546
395
|
*/
|
547
|
-
|
396
|
+
__exports__["default"] = Ember.Mixin.create({
|
548
397
|
/**
|
549
398
|
@method activate
|
550
399
|
@private
|
@@ -691,17 +540,15 @@ define("ember-simple-auth/mixins/application_route_mixin",
|
|
691
540
|
}
|
692
541
|
}
|
693
542
|
});
|
694
|
-
|
695
|
-
__exports__.ApplicationRouteMixin = ApplicationRouteMixin;
|
696
543
|
});
|
697
544
|
define("ember-simple-auth/mixins/authenticated_route_mixin",
|
698
|
-
["./../
|
545
|
+
["./../configuration","exports"],
|
699
546
|
function(__dependency1__, __exports__) {
|
700
547
|
"use strict";
|
701
548
|
var global = (typeof window !== 'undefined') ? window : {},
|
702
549
|
Ember = global.Ember;
|
703
550
|
|
704
|
-
var Configuration = __dependency1__
|
551
|
+
var Configuration = __dependency1__["default"];
|
705
552
|
|
706
553
|
/**
|
707
554
|
The mixin for routes that require the session to be authenticated in order to
|
@@ -724,7 +571,7 @@ define("ember-simple-auth/mixins/authenticated_route_mixin",
|
|
724
571
|
@extends Ember.Mixin
|
725
572
|
@static
|
726
573
|
*/
|
727
|
-
|
574
|
+
__exports__["default"] = Ember.Mixin.create({
|
728
575
|
/**
|
729
576
|
This method implements the enforcement of the session being authenticated.
|
730
577
|
If the session is not authenticated, the current transition will be aborted
|
@@ -745,17 +592,15 @@ define("ember-simple-auth/mixins/authenticated_route_mixin",
|
|
745
592
|
}
|
746
593
|
}
|
747
594
|
});
|
748
|
-
|
749
|
-
__exports__.AuthenticatedRouteMixin = AuthenticatedRouteMixin;
|
750
595
|
});
|
751
596
|
define("ember-simple-auth/mixins/authentication_controller_mixin",
|
752
|
-
["./../
|
597
|
+
["./../configuration","exports"],
|
753
598
|
function(__dependency1__, __exports__) {
|
754
599
|
"use strict";
|
755
600
|
var global = (typeof window !== 'undefined') ? window : {},
|
756
601
|
Ember = global.Ember;
|
757
602
|
|
758
|
-
var Configuration = __dependency1__
|
603
|
+
var Configuration = __dependency1__["default"];
|
759
604
|
|
760
605
|
/**
|
761
606
|
The mixin for the controller that handles the `authenticationRoute` specified
|
@@ -767,7 +612,7 @@ define("ember-simple-auth/mixins/authentication_controller_mixin",
|
|
767
612
|
@class AuthenticationControllerMixin
|
768
613
|
@extends Ember.Mixin
|
769
614
|
*/
|
770
|
-
|
615
|
+
__exports__["default"] = Ember.Mixin.create({
|
771
616
|
/**
|
772
617
|
The authenticator used to authenticate the session.
|
773
618
|
|
@@ -792,18 +637,16 @@ define("ember-simple-auth/mixins/authentication_controller_mixin",
|
|
792
637
|
}
|
793
638
|
}
|
794
639
|
});
|
795
|
-
|
796
|
-
__exports__.AuthenticationControllerMixin = AuthenticationControllerMixin;
|
797
640
|
});
|
798
641
|
define("ember-simple-auth/mixins/login_controller_mixin",
|
799
|
-
["./../
|
642
|
+
["./../configuration","./authentication_controller_mixin","exports"],
|
800
643
|
function(__dependency1__, __dependency2__, __exports__) {
|
801
644
|
"use strict";
|
802
645
|
var global = (typeof window !== 'undefined') ? window : {},
|
803
646
|
Ember = global.Ember;
|
804
647
|
|
805
|
-
var Configuration = __dependency1__
|
806
|
-
var AuthenticationControllerMixin = __dependency2__
|
648
|
+
var Configuration = __dependency1__["default"];
|
649
|
+
var AuthenticationControllerMixin = __dependency2__["default"];
|
807
650
|
|
808
651
|
/**
|
809
652
|
The mixin to use with the controller that handles the `authenticationRoute`
|
@@ -832,7 +675,7 @@ define("ember-simple-auth/mixins/login_controller_mixin",
|
|
832
675
|
@class LoginControllerMixin
|
833
676
|
@extends Ember.SimpleAuth.AuthenticationControllerMixin
|
834
677
|
*/
|
835
|
-
|
678
|
+
__exports__["default"] = Ember.Mixin.create(AuthenticationControllerMixin, {
|
836
679
|
actions: {
|
837
680
|
/**
|
838
681
|
This action will authenticate the session with the configured
|
@@ -853,8 +696,6 @@ define("ember-simple-auth/mixins/login_controller_mixin",
|
|
853
696
|
}
|
854
697
|
}
|
855
698
|
});
|
856
|
-
|
857
|
-
__exports__.LoginControllerMixin = LoginControllerMixin;
|
858
699
|
});
|
859
700
|
define("ember-simple-auth/session",
|
860
701
|
["exports"],
|
@@ -907,7 +748,7 @@ define("ember-simple-auth/session",
|
|
907
748
|
@extends Ember.ObjectProxy
|
908
749
|
@uses Ember.Evented
|
909
750
|
*/
|
910
|
-
|
751
|
+
__exports__["default"] = Ember.ObjectProxy.extend(Ember.Evented, {
|
911
752
|
/**
|
912
753
|
Triggered __whenever the session is successfully authenticated__. When the
|
913
754
|
application uses the mixin,
|
@@ -1169,30 +1010,123 @@ define("ember-simple-auth/session",
|
|
1169
1010
|
});
|
1170
1011
|
}
|
1171
1012
|
});
|
1172
|
-
|
1173
|
-
__exports__.Session = Session;
|
1174
1013
|
});
|
1175
|
-
define("ember-simple-auth/
|
1176
|
-
["./
|
1177
|
-
function(__dependency1__, __dependency2__, __dependency3__, __exports__) {
|
1014
|
+
define("ember-simple-auth/setup",
|
1015
|
+
["./configuration","./session","./stores/local_storage","./stores/ephemeral","./initialize_extension","exports"],
|
1016
|
+
function(__dependency1__, __dependency2__, __dependency3__, __dependency4__, __dependency5__, __exports__) {
|
1178
1017
|
"use strict";
|
1179
|
-
var
|
1180
|
-
var
|
1181
|
-
var
|
1182
|
-
|
1183
|
-
var
|
1184
|
-
|
1185
|
-
|
1186
|
-
|
1187
|
-
|
1018
|
+
var Configuration = __dependency1__["default"];
|
1019
|
+
var Session = __dependency2__["default"];
|
1020
|
+
var LocalStorage = __dependency3__["default"];
|
1021
|
+
var Ephemeral = __dependency4__["default"];
|
1022
|
+
var initializeExtension = __dependency5__["default"];
|
1023
|
+
|
1024
|
+
function extractLocationOrigin(location) {
|
1025
|
+
if (Ember.typeOf(location) === 'string') {
|
1026
|
+
var link = document.createElement('a');
|
1027
|
+
link.href = location;
|
1028
|
+
//IE requires the following line when url is relative.
|
1029
|
+
//First assignment of relative url to link.href results in absolute url on link.href but link.hostname and other properties are not set
|
1030
|
+
//Second assignment of absolute url to link.href results in link.hostname and other properties being set as expected
|
1031
|
+
link.href = link.href;
|
1032
|
+
location = link;
|
1033
|
+
}
|
1034
|
+
var port = location.port;
|
1035
|
+
if (Ember.isEmpty(port)) {
|
1036
|
+
//need to include the port whether its actually present or not as some versions of IE will always set it
|
1037
|
+
port = location.protocol === 'http:' ? '80' : (location.protocol === 'https:' ? '443' : '');
|
1038
|
+
}
|
1039
|
+
return location.protocol + '//' + location.hostname + (port !== '' ? ':' + port : '');
|
1040
|
+
}
|
1188
1041
|
|
1189
|
-
var
|
1042
|
+
var urlOrigins = {};
|
1043
|
+
var documentOrigin = extractLocationOrigin(window.location);
|
1044
|
+
var crossOriginWhitelist;
|
1045
|
+
function shouldAuthorizeRequest(url) {
|
1046
|
+
var urlOrigin = urlOrigins[url] = urlOrigins[url] || extractLocationOrigin(url);
|
1047
|
+
return crossOriginWhitelist.indexOf(urlOrigin) > -1 || urlOrigin === documentOrigin;
|
1048
|
+
}
|
1049
|
+
|
1050
|
+
function registerStores(container) {
|
1190
1051
|
container.register('ember-simple-auth-session-store:local-storage', LocalStorage);
|
1191
1052
|
container.register('ember-simple-auth-session-store:ephemeral', Ephemeral);
|
1192
|
-
}
|
1053
|
+
}
|
1054
|
+
|
1055
|
+
/**
|
1056
|
+
Sets up Ember.SimpleAuth for the application; this method __should be invoked
|
1057
|
+
in a custom initializer__ like this:
|
1058
|
+
|
1059
|
+
```javascript
|
1060
|
+
Ember.Application.initializer({
|
1061
|
+
name: 'authentication',
|
1062
|
+
initialize: function(container, application) {
|
1063
|
+
Ember.SimpleAuth.setup(container, application);
|
1064
|
+
}
|
1065
|
+
});
|
1066
|
+
```
|
1067
|
+
|
1068
|
+
@method setup
|
1069
|
+
@namespace $mainModule
|
1070
|
+
@static
|
1071
|
+
@param {Container} container The Ember.js application's dependency injection container
|
1072
|
+
@param {Ember.Application} application The Ember.js application instance
|
1073
|
+
@param {Object} options
|
1074
|
+
@param {String} [options.authorizerFactory] The authorizer factory to use as it is registered with Ember's container, see [Ember's API docs](http://emberjs.com/api/classes/Ember.Application.html#method_register); when the application does not interact with a server that requires authorized requests, no auzthorizer is needed
|
1075
|
+
@param {Object} [options.storeFactory] The store factory to use as it is registered with Ember's container, see [Ember's API docs](http://emberjs.com/api/classes/Ember.Application.html#method_register) - defaults to `session-stores:local-storage`
|
1076
|
+
@param {Object} [options.sessionPropertyName] The name for the property that the session is injected with into routes and controllers - defaults to `session`
|
1077
|
+
@param {String} [options.authenticationRoute] route to transition to for authentication - defaults to `'login'`
|
1078
|
+
@param {String} [options.routeAfterAuthentication] route to transition to after successful authentication - defaults to `'index'`
|
1079
|
+
@param {Array[String]} [options.crossOriginWhitelist] Ember.SimpleAuth will never authorize requests going to a different origin than the one the Ember.js application was loaded from; to explicitely enable authorization for additional origins, whitelist those origins - defaults to `[]` _(beware that origins consist of protocol, host and port (port can be left out when it is 80 for HTTP or 443 for HTTPS))_
|
1080
|
+
**/
|
1081
|
+
__exports__["default"] = function(container, application, options) {
|
1082
|
+
application.deferReadiness();
|
1083
|
+
registerStores(container);
|
1084
|
+
Configuration.extensionInitializers.forEach(function(initializer) {
|
1085
|
+
initializer(container, application, options);
|
1086
|
+
});
|
1087
|
+
|
1088
|
+
options = options || {};
|
1089
|
+
Configuration.routeAfterAuthentication = options.routeAfterAuthentication || Configuration.routeAfterAuthentication;
|
1090
|
+
Configuration.authenticationRoute = options.authenticationRoute || Configuration.authenticationRoute;
|
1091
|
+
Configuration.sessionPropertyName = options.sessionPropertyName || Configuration.sessionPropertyName;
|
1092
|
+
Configuration.applicationRootUrl = container.lookup('router:main').get('rootURL') || '/';
|
1093
|
+
crossOriginWhitelist = Ember.A(options.crossOriginWhitelist || []).map(function(origin) {
|
1094
|
+
return extractLocationOrigin(origin);
|
1095
|
+
});
|
1096
|
+
|
1097
|
+
options.storeFactory = options.storeFactory || 'ember-simple-auth-session-store:local-storage';
|
1098
|
+
var store = container.lookup(options.storeFactory);
|
1099
|
+
var session = Session.create({ store: store, container: container });
|
1100
|
+
|
1101
|
+
container.register('ember-simple-auth-session:main', session, { instantiate: false });
|
1102
|
+
Ember.A(['controller', 'route']).forEach(function(component) {
|
1103
|
+
container.injection(component, Configuration.sessionPropertyName, 'ember-simple-auth-session:main');
|
1104
|
+
});
|
1193
1105
|
|
1194
|
-
|
1195
|
-
|
1106
|
+
if (!Ember.isEmpty(options.authorizerFactory)) {
|
1107
|
+
var authorizer = container.lookup(options.authorizerFactory);
|
1108
|
+
if (!!authorizer) {
|
1109
|
+
authorizer.set('session', session);
|
1110
|
+
Ember.$.ajaxPrefilter(function(options, originalOptions, jqXHR) {
|
1111
|
+
if (shouldAuthorizeRequest(options.url)) {
|
1112
|
+
authorizer.authorize(jqXHR, options);
|
1113
|
+
}
|
1114
|
+
});
|
1115
|
+
Ember.$(document).ajaxError(function(event, jqXHR, setting, exception) {
|
1116
|
+
if (jqXHR.status === 401) {
|
1117
|
+
session.trigger('authorizationFailed');
|
1118
|
+
}
|
1119
|
+
});
|
1120
|
+
}
|
1121
|
+
} else {
|
1122
|
+
Ember.Logger.debug('No authorizer factory was specified for Ember.SimpleAuth - specify one if backend requests need to be authorized.');
|
1123
|
+
}
|
1124
|
+
|
1125
|
+
var advanceReadiness = function() {
|
1126
|
+
application.advanceReadiness();
|
1127
|
+
};
|
1128
|
+
session.restore().then(advanceReadiness, advanceReadiness);
|
1129
|
+
}
|
1196
1130
|
});
|
1197
1131
|
define("ember-simple-auth/stores/base",
|
1198
1132
|
["../utils/flat_objects_are_equal","exports"],
|
@@ -1201,7 +1135,7 @@ define("ember-simple-auth/stores/base",
|
|
1201
1135
|
var global = (typeof window !== 'undefined') ? window : {},
|
1202
1136
|
Ember = global.Ember;
|
1203
1137
|
|
1204
|
-
var flatObjectsAreEqual = __dependency1__
|
1138
|
+
var flatObjectsAreEqual = __dependency1__["default"];
|
1205
1139
|
|
1206
1140
|
/**
|
1207
1141
|
The base for all store types. __This serves as a starting point for
|
@@ -1218,7 +1152,7 @@ define("ember-simple-auth/stores/base",
|
|
1218
1152
|
@extends Ember.Object
|
1219
1153
|
@uses Ember.Evented
|
1220
1154
|
*/
|
1221
|
-
|
1155
|
+
__exports__["default"] = Ember.Object.extend(Ember.Evented, {
|
1222
1156
|
/**
|
1223
1157
|
__Triggered when the data that constitutes the session changes in the
|
1224
1158
|
store. This usually happens because the session is authenticated or
|
@@ -1282,8 +1216,6 @@ define("ember-simple-auth/stores/base",
|
|
1282
1216
|
clear: function() {
|
1283
1217
|
}
|
1284
1218
|
});
|
1285
|
-
|
1286
|
-
__exports__.Base = Base;
|
1287
1219
|
});
|
1288
1220
|
define("ember-simple-auth/stores/ephemeral",
|
1289
1221
|
["./base","exports"],
|
@@ -1292,7 +1224,7 @@ define("ember-simple-auth/stores/ephemeral",
|
|
1292
1224
|
var global = (typeof window !== 'undefined') ? window : {},
|
1293
1225
|
Ember = global.Ember;
|
1294
1226
|
|
1295
|
-
var Base = __dependency1__
|
1227
|
+
var Base = __dependency1__["default"];
|
1296
1228
|
|
1297
1229
|
/**
|
1298
1230
|
Store that saves its data in memory and thus __is not actually persistent__.
|
@@ -1308,7 +1240,7 @@ define("ember-simple-auth/stores/ephemeral",
|
|
1308
1240
|
@namespace Stores
|
1309
1241
|
@extends Stores.Base
|
1310
1242
|
*/
|
1311
|
-
|
1243
|
+
__exports__["default"] = Base.extend({
|
1312
1244
|
/**
|
1313
1245
|
@method init
|
1314
1246
|
@private
|
@@ -1347,8 +1279,6 @@ define("ember-simple-auth/stores/ephemeral",
|
|
1347
1279
|
this._data = {};
|
1348
1280
|
}
|
1349
1281
|
});
|
1350
|
-
|
1351
|
-
__exports__.Ephemeral = Ephemeral;
|
1352
1282
|
});
|
1353
1283
|
define("ember-simple-auth/stores/local_storage",
|
1354
1284
|
["./base","../utils/flat_objects_are_equal","exports"],
|
@@ -1357,8 +1287,8 @@ define("ember-simple-auth/stores/local_storage",
|
|
1357
1287
|
var global = (typeof window !== 'undefined') ? window : {},
|
1358
1288
|
Ember = global.Ember;
|
1359
1289
|
|
1360
|
-
var Base = __dependency1__
|
1361
|
-
var flatObjectsAreEqual = __dependency2__
|
1290
|
+
var Base = __dependency1__["default"];
|
1291
|
+
var flatObjectsAreEqual = __dependency2__["default"];
|
1362
1292
|
|
1363
1293
|
/**
|
1364
1294
|
Store that saves its data in the browser's `localStorage`.
|
@@ -1370,7 +1300,7 @@ define("ember-simple-auth/stores/local_storage",
|
|
1370
1300
|
@namespace Stores
|
1371
1301
|
@extends Stores.Base
|
1372
1302
|
*/
|
1373
|
-
|
1303
|
+
__exports__["default"] = Base.extend({
|
1374
1304
|
/**
|
1375
1305
|
The prefix to use for the store's keys so they can be distinguished from
|
1376
1306
|
others.
|
@@ -1480,22 +1410,6 @@ define("ember-simple-auth/stores/local_storage",
|
|
1480
1410
|
});
|
1481
1411
|
}
|
1482
1412
|
});
|
1483
|
-
|
1484
|
-
__exports__.LocalStorage = LocalStorage;
|
1485
|
-
});
|
1486
|
-
define("ember-simple-auth/utils",
|
1487
|
-
["./utils/is_secure_url","./utils/flat_objects_are_equal","exports"],
|
1488
|
-
function(__dependency1__, __dependency2__, __exports__) {
|
1489
|
-
"use strict";
|
1490
|
-
var isSecureUrl = __dependency1__.isSecureUrl;
|
1491
|
-
var flatObjectsAreEqual = __dependency2__.flatObjectsAreEqual;
|
1492
|
-
|
1493
|
-
var Utils = {
|
1494
|
-
isSecureUrl: isSecureUrl,
|
1495
|
-
flatObjectsAreEqual: flatObjectsAreEqual
|
1496
|
-
};
|
1497
|
-
|
1498
|
-
__exports__.Utils = Utils;
|
1499
1413
|
});
|
1500
1414
|
define("ember-simple-auth/utils/flat_objects_are_equal",
|
1501
1415
|
["exports"],
|
@@ -1505,7 +1419,7 @@ define("ember-simple-auth/utils/flat_objects_are_equal",
|
|
1505
1419
|
@method flatObjectsAreEqual
|
1506
1420
|
@private
|
1507
1421
|
*/
|
1508
|
-
|
1422
|
+
__exports__["default"] = function(a, b) {
|
1509
1423
|
function sortObject(object) {
|
1510
1424
|
var array = [];
|
1511
1425
|
for (var property in object) {
|
@@ -1522,9 +1436,7 @@ define("ember-simple-auth/utils/flat_objects_are_equal",
|
|
1522
1436
|
});
|
1523
1437
|
}
|
1524
1438
|
return JSON.stringify(sortObject(a)) === JSON.stringify(sortObject(b));
|
1525
|
-
}
|
1526
|
-
|
1527
|
-
__exports__.flatObjectsAreEqual = flatObjectsAreEqual;
|
1439
|
+
}
|
1528
1440
|
});
|
1529
1441
|
define("ember-simple-auth/utils/is_secure_url",
|
1530
1442
|
["exports"],
|
@@ -1534,14 +1446,58 @@ define("ember-simple-auth/utils/is_secure_url",
|
|
1534
1446
|
@method isSecureUrl
|
1535
1447
|
@private
|
1536
1448
|
*/
|
1537
|
-
|
1449
|
+
__exports__["default"] = function(url) {
|
1538
1450
|
var link = document.createElement('a');
|
1539
1451
|
link.href = url;
|
1540
1452
|
link.href = link.href;
|
1541
1453
|
return link.protocol == 'https:';
|
1542
|
-
}
|
1543
|
-
|
1544
|
-
__exports__.isSecureUrl = isSecureUrl;
|
1454
|
+
}
|
1545
1455
|
});
|
1546
|
-
|
1456
|
+
var setup = requireModule('ember-simple-auth/setup').default;
|
1457
|
+
var initializeExtension = requireModule('ember-simple-auth/initialize_extension').default;
|
1458
|
+
var Configuration = requireModule('ember-simple-auth/configuration').default;
|
1459
|
+
var Session = requireModule('ember-simple-auth/session').default;
|
1460
|
+
var BaseAuthenticator = requireModule('ember-simple-auth/authenticators/base').default;
|
1461
|
+
var BaseAuthorizer = requireModule('ember-simple-auth/authorizers/base').default;
|
1462
|
+
var BaseStore = requireModule('ember-simple-auth/stores/base').default;
|
1463
|
+
var LocalStorageStore = requireModule('ember-simple-auth/stores/local_storage').default;
|
1464
|
+
var EphemeralStore = requireModule('ember-simple-auth/stores/ephemeral').default;
|
1465
|
+
var flatObjectsAreEqual = requireModule('ember-simple-auth/utils/flat_objects_are_equal').default;
|
1466
|
+
var isSecureUrl = requireModule('ember-simple-auth/utils/is_secure_url').default;
|
1467
|
+
var ApplicationRouteMixin = requireModule('ember-simple-auth/mixins/application_route_mixin').default;
|
1468
|
+
var AuthenticatedRouteMixin = requireModule('ember-simple-auth/mixins/authenticated_route_mixin').default;
|
1469
|
+
var AuthenticationControllerMixin = requireModule('ember-simple-auth/mixins/authentication_controller_mixin').default;
|
1470
|
+
var LoginControllerMixin = requireModule('ember-simple-auth/mixins/login_controller_mixin').default;
|
1471
|
+
|
1472
|
+
global.Ember.SimpleAuth = {
|
1473
|
+
setup: setup,
|
1474
|
+
|
1475
|
+
initializeExtension: initializeExtension,
|
1476
|
+
|
1477
|
+
Session: Session,
|
1478
|
+
|
1479
|
+
Authenticators: {
|
1480
|
+
Base: BaseAuthenticator
|
1481
|
+
},
|
1482
|
+
|
1483
|
+
Authorizers: {
|
1484
|
+
Base: BaseAuthorizer
|
1485
|
+
},
|
1486
|
+
|
1487
|
+
Stores: {
|
1488
|
+
Base: BaseStore,
|
1489
|
+
LocalStorage: LocalStorageStore,
|
1490
|
+
Ephemeral: EphemeralStore
|
1491
|
+
},
|
1492
|
+
|
1493
|
+
Utils: {
|
1494
|
+
flatObjectsAreEqual: flatObjectsAreEqual,
|
1495
|
+
isSecureUrl: isSecureUrl
|
1496
|
+
},
|
1497
|
+
|
1498
|
+
ApplicationRouteMixin: ApplicationRouteMixin,
|
1499
|
+
AuthenticatedRouteMixin: AuthenticatedRouteMixin,
|
1500
|
+
AuthenticationControllerMixin: AuthenticationControllerMixin,
|
1501
|
+
LoginControllerMixin: LoginControllerMixin
|
1502
|
+
};
|
1547
1503
|
})((typeof global !== 'undefined') ? global : window);
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ember_simple_auth-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- frederik dudzik
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-06-
|
11
|
+
date: 2014-06-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|