In my scenario, I have two XS applications. One has authentication: null and other has authentication : {method: Basic}.
First application has a link that calls the second application. The second application has xsjs service that is creating users and assigning roles specific to my project. When I call my second xsjs service, I get the logon prompt. I now want to LOGOUT (- using code -) once the service is completed. How do I do that ?
For form login I ususally use following snippet, but have no idea as what-to-use in Basic Authentication case -
function send(CSRFToken) {$.ajax({
url : "/sap/hana/xs/formLogin/logout.xscfunc",
type : "POST",
dataType : "json",
beforeSend : function(xhr) {
xhr.setRequestHeader("X-CSRF-Token",CSRFToken);
},
success : function() {
window.location.reload();
}
});
}