Is it possible to trigger a logout for the current user in a Freemarker template? Don't want to make anything complicated, only triggering the logout like the link in the web client. Tried to copy the form from the webclient but it's probably a little more complicated as this.
It can't be done out-of-the-box but it should be fairly easy to achieve with some Java coding.
You'll need to write a small servlet that can get access to the LoginBean and call the logout method.
You'll need to get hold of a FacesContext object in the servlet, retrieve the bean and call the method. A similar thing is done in ExternalAccessServlet, you can use this as a guide.
Then from your freemarker script you can just add a link to the servlet.