This repository has been archived on 2025-03-30. You can view files and clone it, but cannot push or open issues or pull requests.
hymenobacterdotinfo/app/pods/protected/route.js
2015-07-10 10:34:17 -08:00

12 lines
388 B
JavaScript

import Ember from 'ember';
import AuthenticatedRouteMixin from 'simple-auth/mixins/authenticated-route-mixin';
import parseBase64 from '../../utils/parse-base64';
export default Ember.Route.extend(AuthenticatedRouteMixin, {
model: function() {
let token = this.get('session.secure.token');
let user = parseBase64(token);
return this.store.find('user', user.sub);
},
});