ENH: Set up ember-simple-auth (initial) ()

Fixes 
This commit is contained in:
Matthew Ryan Dillon 2017-07-10 20:38:12 -07:00 committed by GitHub
parent 8897e35398
commit 75b75358cd
16 changed files with 200 additions and 34 deletions
app/authorizers

View file

@ -0,0 +1,13 @@
import Ember from 'ember';
import BaseAuthorizer from 'ember-simple-auth/authorizers/base';
const { isEmpty } = Ember;
export default BaseAuthorizer.extend({
authorize(data, block) {
const accessToken = data['token'];
if (!isEmpty(accessToken)) {
block('Authorization', `Token ${accessToken}`);
}
}
});