22cf220fb83e5b8ca096c6f9d940db4d2b95cbbe
[src/app-framework-demo.git] / afb-client / app / Frontend / etc / 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 ($location, $window) {
9
10                 // console.log ("URL="+ $location.url() + " Query=" + location.href+ " window=" + document.referrer);
11
12                 var myConfig = {
13                     paths: { // Warning paths should end with /
14                         image : 'images/',
15                         avatar: 'images/avatars/',
16                         audio : 'images/audio/',
17                         appli : 'images/appli/'
18                     },
19                     
20                     api: { // Warning paths should end with /
21                        token : '/api/token/'
22                     },
23                     
24                     session: { // Those data are updated by session service
25                        refresh : '/api/token/refresh',
26                        ping    : '/api/token/check',
27                        initial : '123456789',  // typical dev initial token
28                        timeout : 3600,         // timeout is updated client sessin context creation
29                        pingrate: 60,           // Ping rate to check if server is still alive
30                        uuid    : '',           // uuid map with cookie or long term session access key
31                        token   : ''            // will be returned from authentication    
32                     }
33                 };
34
35                 return myConfig;
36             });
37
38 })();