Hello you all.
Can any one explain a bit how to use the loginForm in a mobile solution?
Cheers,
security.authenticate([sUsername, sPassword]);
function ws_authenticate(sUser, sPassword)
{
var sUserID = security.getUserUID(sUser);
if (!security.checkPassword(sUserID, sPassword)) {
return false;
}
var oRetval = {
username : sUser,
userid : sUserID
}
return oRetval;
}
security.authenticate([fvUsername, fvPassword]);
forms.main.controller.show();
jcompagner wrote:in the mobile solution authenticate() call doesn't return anything
function authenticate(callbackSuccess, callbackError) {
scopes.ui.showLoading(null, i18n.getI18NMessage('servoy.mobile.authenticating'));
$.ajax({
type: "GET",
url: scopes.globals.serverURL + "/servoy-service/rest_ws/dss_mobile_service/authenticate/1/list",
dataType: "json",
async: true,
timeout: 5000,
beforeSend: function(header) {
header.setRequestHeader("Authorization", "Basic " + scopes.encryption.encodeBase64(scopes.globals.username + ':' + scopes.globals.password));
},
success: function(result) {
scopes.ui.hideLoading();
callbackSuccess(result);
},
error: function(httpRequest, status, error) {
scopes.ui.hideLoading();
callbackError(httpRequest, status, error);
}
});
}
Users browsing this forum: No registered users and 12 guests