Categories
Ext. Library Learning XPages Notes In 9 XPages

NotesIn9: 049 XPages: Login and Logout

In this show I take a look at how to use the Login and Logout node of the Extension Libraries Application Layout Control. It should be noted that currently there’s a bug in the extension library where the logout piece doesn’t actually work. So I demonstrate how to get around that until it gets fixed.

Some code from the show:

Setting the “Can Logout” ability:
sessionScope.put(“extlib.user.canlogout”, true)

A link for the manual logout node:

href = facesContext.getExternalContext().getRequest().getContextPath() + “?Logout&redirectTo=” + facesContext.getExternalContext().getRequest().getContextPath()

Control rendering on the manual logout node:

var uName = session.getEffectiveUserName();
if(uName == “Anonymous”) {
return false;
}

else {
return true;
}