on 02-07-2016 6:27 AM
HI Friends
I am trying to see if there is any standard GW OData Service to logout the SAPUI5 session and establish the session when we login again?
I have an issue while I am using SAP Portal to launch GW sapui5 application. And as we are still using SAPEP 7.0, I am launching the SAPUI5 app as a new window. When user closes the SAPUI5 tab/window and logout of SAPEP, again login with another user id , the old session is retained in the SAPUI5 app.
I need a way to logout the SAP GW user when SAPEP is loggedout.
refering the old thread but not sure if this works for SAP GW and SAP EP.
Logout from SAPUI5 / XSJS page | SCN
https://help.sap.com/saphelp_uiaddon10/helpdata/en/66/a7a5de69b340c4ac857a5c0d95de6c/content.htm
https://help.sap.com/saphelp_uiaddon10/helpdata/en/8b/d342ae2cca4097b13e30dfba335c09/content.htm
all are using the below simple event to clear
$.ajax({
type: "GET",
url: "/sap/public/bc/icf/logoff", //Clear SSO cookies: SAP Provided service to do that
});
Thanks
Hi,
I use below function
$.ajax({
type: "GET",
url: "http://<server>:<port>/sap/public/bc/icf/logoff", //Clear SSO cookies: SAP Provided service to do that
}).done(function(data) { //Now clear the authentication header stored in the browser
if (!document.execCommand("ClearAuthenticationCache")) {
//"ClearAuthenticationCache" will work only for IE. Below code for other browsers
$.ajax({
type: "GET",
url: "http://<server>:<port>/<serviceURL>", //any URL to a Gateway service
username: 'dummy', //dummy credentials: when request fails, will clear the authentication header
password: 'dummy',
statusCode: {
401: function() {
//This empty handler function will prevent authentication pop-up in chrome/firefox
}
},
error: function() {
//alert('reached error of wrong username password')
}
});
}
})
hope this helps
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.