Skip to Content
0
Dec 22, 2022 at 01:40 AM

cloud foundry auto logout from fiori launchpad using sapui5 application?

454 Views Last edit Dec 22, 2022 at 09:06 AM 2 rev

Hi All,

I want to auto logout from the launchpad using sapui5 application. If the idle time reached 5mins after that launchpad should logout automatically using SAPUI5 application. I have tried to call the logout page but I'm getting 404 not found error. I have attached the screenshot and code for your reference. Please advise me on this issue. cflogoutissue.png

xs-app.json file<br>{
"welcomeFile": "/index.html", "authenticationMethod": "route", "logout": { "logoutEndpoint": "/do/logout" }, "routes": [ {
"source": "^/logout-page.html$", "service": "html5-apps-repo-rt", "authenticationType": "none" }, { "source": "^index.html$", "service": "html5-apps-repo-rt", "authenticationType": "xsuaa", "cacheControl": "no-cache, no-store, must-revalidate" }, { "source": "^/resources/(.*)$", "target": "/resources/$1", "authenticationType": "none", "destination": "ui5", "cacheControl": "no-cache, no-store, must-revalidate" }, { "source": "^/test-resources/(.*)$", "target": "/test-resources/$1", "authenticationType": "none", "destination": "ui5" }, { "source": "^(.*)$", "target": "$1", "service": "html5-apps-repo-rt", "authenticationType": "xsuaa" } ]}
Controller.js<br><br> // Interval Function Start
fnInterval: function () { var that = this; timer = setInterval(function () { that.onLogout(); }, 60000); // }, 300000); }, onLogout: function () { var that = this; sap.m.URLHelper.redirect("do/logout", false); console.log("Auto Logout /do/logout"); },

Attachments

cflogoutissue.png (57.6 kB)