diff --git a/app/pods/login/controller.js b/app/pods/login/controller.js index 496efda..5cf6e07 100644 --- a/app/pods/login/controller.js +++ b/app/pods/login/controller.js @@ -5,7 +5,7 @@ export default Ember.Controller.extend({ authenticate: function() { let credentials = this.getProperties('identification', 'password'); let session = this.get('session'); - let authenticator = 'simple-auth-authenticator:token'; + let authenticator = 'simple-auth-authenticator:jwt'; // Manually clean up because there might not be a transition this.get('flashMessages').clearMessages(); diff --git a/config/environment.js b/config/environment.js index b869a30..38b6e25 100644 --- a/config/environment.js +++ b/config/environment.js @@ -27,6 +27,9 @@ module.exports = function(environment) { tokenPropertyName: 'token', authorizationPrefix: 'Bearer ', authorizationHeaderName: 'Authorization', + refreshAccessTokens: true, + timeFactor: 1000, + refreshLeeway: 300, }, contentSecurityPolicy: { 'default-src': "'none'", @@ -61,6 +64,7 @@ module.exports = function(environment) { ENV['simple-auth']['crossOriginWhitelist'] = [apiURL]; ENV['simple-auth-token']['serverTokenEndpoint'] = apiURL + '/api/authenticate'; + ENV['simple-auth-token']['serverTokenRefreshEndpoint'] = apiURL + '/api/refresh'; ENV.apiURL = apiURL; ENV.contentSecurityPolicy['connect-src'] = "'self' " + apiURL;