1(function (window, angular) { 2 'use strict'; 3 4 angular 5 .module('RFPe') 6 .service('loginService', LoginService); 7 8 LoginService.$inject = ['$http']; 9 10 function LoginService($http) { 11 12 function getSettings() { 13 return $http({ 14 method: "GET", 15 //url: CONFIG.baseService + 'site/env' 16 url: '/settings-web.json' 17 }); 18 } 19 20 function registerToken(token) { 21 $http.defaults.headers.common['x-auth-token'] = token; 22 } 23 24 function doLogin(data) { 25 return $http({ 26 method: "POST", 27 url: CONFIG.baseService + 'api/login', 28 data: 'username=' + data.username + '&password=' + data.password, 29 headers: { 30 'Content-Type': 'application/x-www-form-urlencoded' 31 } 32 }); 33 } 34 35 return { 36 getSettings: getSettings, 37 doLogin: doLogin, 38 registerToken: registerToken 39 }; 40 } 41})(window, angular);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.