In my Vaadin application I would like to have a logout button which redirects me to the login screen and forces the user to enter credentials. I use WebSphere as application server and the login is done via http basic authentication.
So far I have tried this:
VaadinRequest vaadinRequest = VaadinService.getCurrentRequest();
VaadinServletRequest vaadinServletRequest = (VaadinServletRequest) vaadinRequest;
HttpServletRequest hsRequest = vaadinServletRequest.getHttpServletRequest();
try
{
hsRequest.logout();
}
catch (ServletException e)
{
// TODO Auto-generated catch block
e.printStackTrace();
}
And this:
UI.getCurrent().getPage().setLocation("/framework42/S42FwWeb/?restartApplication");
I am also aware that I can use
UI.getCurrent().getPage().setLocation("/pkmslogout");
to perform the logout via WebSeal. I would like the logout to work in development environment, too, where we do not use a WebSeal.
Any help is very appreciated!