Readme, quick bootstrapping, login, ember-data check
sdfsdf
This commit is contained in:
parent
978dacb16e
commit
0e16d2b0f4
22 changed files with 189 additions and 9 deletions
10
app/authorizers/custom.js
Normal file
10
app/authorizers/custom.js
Normal file
|
@ -0,0 +1,10 @@
|
|||
import Ember from 'ember';
|
||||
import Base from 'simple-auth/authorizers/base';
|
||||
|
||||
export default Base.extend({
|
||||
authorize: function(jqXHR, requestOptions) {
|
||||
if (this.get('session.isAuthenticated') && !Ember.isEmpty(this.get('session.token'))) {
|
||||
jqXHR.setRequestHeader('Authorization', 'Bearer ' + this.get('session.token'));
|
||||
}
|
||||
}
|
||||
});
|
Reference in a new issue