Added AFB monitoring and token auto-refresh
[src/app-framework-demo.git] / afb-client / app / Frontend / services / ConfigApp.js
1 (function () {
2     'use strict';
3
4     // _all modules only reference dependencies
5     angular.module('ConfigApp', [])
6
7             // Factory is a singleton and share its context within all instances.
8             .factory('ConfigApp', function () {
9
10
11                 var myConfig = {
12                     paths: { // Warning paths should end with /
13                         images : 'images/',
14                         avatars: 'images/avatars/'
15                     },
16                     
17                     api: { // Warning paths should end with /
18                        token : '/api/token/'
19                     },
20                     
21                     session: { // Those data are updated by session service
22                        refresh : '/api/token/refresh',
23                        ping    : '/api/token/check',
24                        token   : '123456789',  // typical dev initial token
25                        timeout : 3600,         // timeout is updated client sessin context creation
26                        uuid    : '',           // uuid map with cookie or long term session access key
27                        pingrate: 60            // Ping rate to check if server is still alive
28                     }
29                 };
30
31                 return myConfig;
32             });
33
34 })();