GUAC-919: POST login via form data.

This commit is contained in:
Michael Jumper
2014-11-03 13:47:30 -08:00
parent 5c43ae4ff9
commit 1b121ba665

View File

@@ -36,7 +36,17 @@ angular.module('index').factory('authenticationService', ['$http',
* @returns {promise} A promise for the HTTP call.
*/
service.login = function login(username, password) {
return $http.post("api/login?username=" + username +"&password=" + password);
return $http({
method: 'POST',
url: 'api/login',
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
},
data: $.param({
username: username,
password: password
})
});
};
return service;