GUAC-919: POST login via form data.
This commit is contained in:
1 parent
5c43ae4ff9
commit
1b121ba665
1 file changed
+11
-1
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user