Swapped custom auth for component.

This commit is contained in:
Matthew Dillon 2015-03-23 14:17:57 -08:00
parent 8dbd01c7b1
commit 8e37bce7c7
8 changed files with 33 additions and 82 deletions

View file

@ -1,10 +0,0 @@
import Ember from 'ember';
import Base from 'simple-auth/authorizers/base';
export default Base.extend({
authorize: function(jqXHR) {
if (this.get('session.isAuthenticated') && !Ember.isEmpty(this.get('session.token'))) {
jqXHR.setRequestHeader('Authorization', 'Bearer ' + this.get('session.token'));
}
}
});