27e2e3eb6fa4e25f45567a316a89babcdc042b7c
[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                     myapi: { // Warning paths should end with /
21                        token : '/api/myplugin/xxxx'
22                     },
23                     
24                     session: { // Those data are updated by session service
25                        create  : '/api/token/create',
26                        refresh : '/api/token/refresh',
27                        check   : '/api/token/check',
28                        reset   : '/api/token/reset',
29                        ping    : '/api/token/check',
30                        initial : '123456789',  // typical dev initial token
31                        timeout : 3600,         // timeout is updated client sessin context creation
32                        pingrate: 60,           // Ping rate to check if server is still alive
33                        uuid    : '',           // uuid map with cookie or long term session access key
34                        token   : ''            // will be returned from authentication    
35                     }
36                 };
37
38                 return myConfig;
39             });
40
41 })();