Javascript Api: Assignment Manager Logout Error
Confluence User - 31 Jan, 2022
I'm trying to implement logout function which let the user logout and then redirect him to another page I specify. I'm using the UniversalTheme. Currently I have added a function to logout the user using AssignmentManager logout as per joget documentation. The issue that I'm facing currently that It's first throwing an error in my console saying that connection refused the other thing I'm not this will allow me to add some code for redirection after logout. My question is as follows:
- What is the best way to logout the user and redirect him to some page I specify?
- Why AssignmentManager connection refused?
- Does AssignmentManager redirect user after logout?
Logout code:
html = html + " <li><a onclick=\"user_logout()\">
<i class=\"fa fa-power-off\"></i> "
+ ResourceBundleUtil.getMessage("theme.universal.logout") + "</a></li>\n</ul>";
Javascript Api Code:
function user_logout(){
window.location.href=AssignmentManager.logout('http://localhost/jw');
}
universaltheme;javascript;java