Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
All,
I am using a mashup with SAML authentication. Now I want to user to be able to logout via a button in the mashup. Could someone help me with the code I should use?
I found this page, but not sure how to use it exactly:
Hi Jeroen,
just use this:
DELETE -> {virtual proxy}/qps/user
You have to change the order it is at the moment wrong documented:
bye Konrad
Hi Jeroen,
just use this:
DELETE -> {virtual proxy}/qps/user
You have to change the order it is at the moment wrong documented:
bye Konrad
Hi Konrad,
I am afraid I am unfamiliar with using QPS API. How would I call this DELETE method using JavaScript? I tried the following but it gives an error:
var logoutbutton = function() {
$.ajax({
type: 'DELETE',
url: 'https://<server>/<virtual directory>/qps/user?Xrfkey=0123456789abcdef',
headers: {
'X-Qlik-Xrfkey':'0123456789abcdef',
'Content-Type':'application/json'
}
});
Hi Jeroen,
please send it without Xrfkkey in URL and add no headers.
bye Konrad
Hi Konrad,
Thanks, it was indeed easier than I thought!
For future reference this is my JS code:
var config = {
host: window.location.hostname,
prefix: prefix,
port: window.location.port,
isSecure: window.location.protocol === "https:"
};
var logoutbutton = function() {
$.ajax({
type: 'DELETE',
url: 'https://' + config.host + config.prefix + 'qps/user'
});
};
And this is my HTML code (logout & refresh page):
<a class="qcmd" onclick="logoutbutton();window.location.reload(true);">Logout</a>
Hi Konrad & Jeroen,
By this code we are able to logout from Qlik not from mashup. right? If we want to logout from mashup then what all changes we need to do?