Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- export default Ember.Route.extend({
- + authManager: Ember.inject.service('session'),
- +
- + actions: {
- + login: function() {
- + let data = { username: 'hacluster', password : 'hacluster'};
- +
- + this.get('authManager').authenticate('authenticator:loginpass', data).then(() => {
- + console.log('@todo: WORKS');
- + }, (err) => {
- + console.log('@todo: UNABLE TO AUTH');
- + });
- + },
- + logout: function() {
- + console.log('info: logout presss');
- + this.get('authManager').invalidate().then(() => {
- + console.log('@todo: LOGOUT works');
- + }, (err) => {
- + console.log('@todo: LOGOUT is not working');
- + });
- + },
- + show: function() {
- + console.log('@todo: SHOW CLUSTER');
- + }
- + }
- +});
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement