mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-10-27 23:23:07 +00:00
GUAC-919: POST login via form data.
This commit is contained in:
@@ -36,7 +36,17 @@ angular.module('index').factory('authenticationService', ['$http',
|
|||||||
* @returns {promise} A promise for the HTTP call.
|
* @returns {promise} A promise for the HTTP call.
|
||||||
*/
|
*/
|
||||||
service.login = function login(username, password) {
|
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;
|
return service;
|
||||||
|
|||||||
Reference in New Issue
Block a user