How to Logout from Outsystems web application using LDAP?

I want to Logout from web application which is using Integrated authentication with LDAP. Is there a way to logout. I tried with session clear and abondon but of no use.Looks like i have to delete cookies.Is there any straight forward way in Outsystems.

Hi Narayan,

You should be able to logout using the User_Logout action from the Users module.

What you should check is if the user is logged in automatically after entering the login page (in the preparation).

I have seen this behavior before. 

You should think about what do you want the user to do after logout.

- Login directly?

- Click on a button to login? Do you want this to be the preferred option on first login?

- Logout to a landing page with a link to the login page to login again?

Kind regards,

Remco Dekkinga

Logout is not happening by using User_logout action...I want the user to be redirected to logout page.

What happens when you do a User_Logout?

Nothing happens or the screen refreshes or is the user redirected to the home screen?

It redirected to logout page but when i access home page again by providing address in browser address bar we expect browser to again show ldap login id pwd dialog box but it directly goes to home page which is not expected.It should ask for LDAP loginid/pwd.

Hi Narayan,

I understand your problem now. 

This part is outside of OutSystems, because you use a third-party tool to login. The third-party tool remembers who logged in on that pc and before the session expires the LDAP systems keeps logging in the same user after the first acceptance of the credentials.

I'm afraid that you should check with your LDAP support employee how to logout of your Identity Provider after logging out of an application.

Kind regards,

Remco Dekkinga

We are using Outsystems LDAP Extension.And below is the code written in Logout extension

public void MssLDAPLogout(out string sscookiesCount) {
            // TODO: Write implementation for action
            sscookiesCount = "";          
            //HttpContext.Current.Response.Cookies.Add(new HttpCookie("ASP.NET_SessionId", ""));
            string[] myCookies = HttpContext.Current.Request.Cookies.AllKeys;
            foreach (string cookie in myCookies)
                sscookiesCount = cookie + "," + sscookiesCount;
                HttpContext.Current.Response.Cookies[cookie].Expires = DateTime.Now.AddDays(-1);
            //sscookiesCount =DeleteAllCookies();

        } // MssLDAPLogout

Still it doesn't work.Also i don't see any logout method in outsystems LDAP extension