1
0
Fork 0
mirror of https://github.com/mmumshad/ansible-playable.git synced 2025-02-24 09:54:16 +00:00
ansible-playable/client/components/auth/auth.module.js

35 lines
821 B
JavaScript
Raw Normal View History

2017-06-07 17:36:44 +00:00
'use strict';
import angular from 'angular';
import constants from '../../app/app.constants';
import util from '../util/util.module';
import ngCookies from 'angular-cookies';
import {
authInterceptor
} from './interceptor.service';
import {
routerDecorator
} from './router.decorator';
import {
AuthService
} from './auth.service';
import {
UserResource
} from './user.service';
import uiRouter from 'angular-ui-router';
function addInterceptor($httpProvider) {
'ngInject';
$httpProvider.interceptors.push('authInterceptor');
}
export default angular.module('app2App.auth', [constants, util, ngCookies, uiRouter])
.factory('authInterceptor', authInterceptor)
.run(routerDecorator)
.factory('Auth', AuthService)
.factory('User', UserResource)
.config(['$httpProvider', addInterceptor])
.name;