Need Support on Logout Functionality

0
Hi Team, I am working on a task where if a user Rejects a task he should be logged out of the system and redirected to the login.html – All this to be done on Microflow action of Reject.   Have written the bellow java action which closes my session and takes me to index.html, however I need to go to login.html. Can you please Let me know how do I navigate to login.html?   @java.lang.Override           public java.lang.Boolean executeAction() throws Exception           {                      // BEGIN USER CODE                       com.mendix.core.Core.logout(getContext().getSession());     return true;                                           //throw new com.mendix.systemwideinterfaces.MendixRuntimeException("Java action was not implemented");                         // END USER CODE           }             /**            * Returns a string representation of this action            */           @java.lang.Override           public java.lang.String toString()           {                      return "Java_action_LogOut";           }   Please note that SSO is configured for this application.   Thanks Rachana BP Hi Team, I am working on a task where if a user Rejects a task he should be logged out of the system and redirected to the login.html – All this to be done on Microflow action of Reject.   Have written the bellow java action which closes my session and takes me to index.html, however I need to go to login.html. Can you please Let me know how do I navigate to login.html?   @java.lang.Override           public java.lang.Boolean executeAction() throws Exception           {                      // BEGIN USER CODE                       com.mendix.core.Core.logout(getContext().getSession());     return true;                                           //throw new com.mendix.systemwideinterfaces.MendixRuntimeException("Java action was not implemented");                         // END USER CODE           }             /**            * Returns a string representation of this action            */           @java.lang.Override           public java.lang.String toString()           {                      return "Java_action_LogOut";           }   Please note that SSO is configured for this application.   Thanks Rachana BP
asked
4 answers
1

 

com.mendix.webui.FeedbackHelper.addLoginFeedback(this.getContext())

?

var hsr=res.getHttpServletResponse();
hsr.sendRedirect('/login.html');

?

answered
5

Hi Rachana,
   You can use the microflow having the action to remove current SSO session from the application using call REST service (Configure the API url of DELETE session with okta ID) activity

answered
2

The way I implemented it using Okta was a LogOut Microflow that called the Okta API to end the session of the user that was logged in and also calling the Java action Logoff.

by default when this happens the application usually sends the user back to the index.html page automatically, which for us includes a way to sign in via SSO (Okta).

If needed you could make the index.html page contain your Single Sign on functionality, just a button that calls a link to append the “/SSO/” to the end of your current URL. This would keep you outside of having to mess with any type of Java if you are not 100% comfortable with that.

answered
1

Hello Rachana,

I think if you are using the SAML module you will have a constant named DefaultLogoutPage within that module which you can point to your desired page and that should do the job.

Hope this helps

answered