Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » scout » Logout(Logout redirect)
Logout [message #1747247] Fri, 11 November 2016 09:08 Go to next message
Luka Cavic is currently offline Luka CavicFriend
Messages: 25
Registered: August 2014
Junior Member
Hi,

I am using custom form for login to application. execGuiAttached is showing form. Now when I click logout, that destorys session I am redirected to /logout. Then I need to remove /logout from url and to login again.

Question is: How to disable that redirect, and display form for login again, call execGuiAttached again? Thanks
Re: Logout [message #1747377 is a reply to message #1747247] Mon, 14 November 2016 07:47 Go to previous message
Andre Wegmueller is currently offline Andre WegmuellerFriend
Messages: 31
Registered: September 2012
Location: Baden-D├Ąttwil, Switzerla...
Member
When you do a logout, the UI server sends a logout event to the browser. This event contains the logout URL, which is "./logout" by default. This URL is defined in the UiSession class. You can simply change this URL to "login", so the login-form will be shown when a user clicks on logout in the UI. To do this you must subclass UiSession and override the getLogoutRedirectUrl method, like this:

  
  @Override
  public String getLogoutRedirectUrl() {
    return "login";
  }


Use the BeanManager to register your custom UiSession (see: https://eclipsescout.github.io/6.0/technical-guide.html#sec-bean.manager)
Previous Topic:[neon] Login with http works, but not https
Next Topic:Issues with Hello World example for beginners
Goto Forum:
  


Current Time: Mon Jul 24 17:02:45 GMT 2017

Powered by FUDForum. Page generated in 0.04067 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software