BLOG

KB 2805: Automatic logout from the public portal when closing the browser

BACKGROUND

You want your users to be logged out as soon as they close their browsers.

The goal is to automatically launch access to the URL http://keyword.olfeo.com/logout in order to disconnect the public portal session.

This tool is available and can be modified according to your needs. Olfeo technical support will not provide any assistance with modification, deployment, or any other requests related to this item.

Required tools

Visual Studio (file modification)
csc.exe (compilation)

Files provided

auto_deco.cs (to be modified)
runhide.vbs (to be kept)

Modification of the auto_deco.cs file

Using the Visual Studio tool, you can easily modify the auto_deco.cs file.

Inline 60, you need to change the proxy value
WebProxy myProxy = new WebProxy("IP_OLFEO/FQDN", PORT_PROXY);
to match your network.

Example:

WebProxy myProxy = new WebProxy("10.12.0.5", 3129);

Save your file once you have made changes.

Compilation

Launch the command prompt as an administrator.
Go to the folder where the auto_deco.cs file is located.

Example:
cd "\Users\…\Desktop\auto déco"

Run the csc.exe program (compiler) on the auto_deco.cs file, and the auto_deco.exe program will be created.

Example:

c:\Windows\Microsoft.NET\Framework64\v4.0.30319\csc.exe auto_deco.cs

Implementation

Once your program has been compiled, you will need to use it via a shortcut that you will need to create.

Example

Target for a Firefox shortcut.

"C:\Users\….\Desktop\auto deco\runhide.vbs" auto_deco.exe firefox http://www.olfeo.com

The shortcut is in the following format
r runhide.vbs auto_deco.exe browser URL_opening

The browsers supported in the program are:

firefox
chrome
msedge
iexplorer

Validation

  1. Launch the Firefox shortcut. The Firefox browser should open and the public portal page should be displayed. (The browser's proxy configuration is not affected in our case.)
  2. You log in with your public portal ID.
  3. Close the browser
  4. A pop-up window stating "Disconnecting from the public portal OK"
  5. Launch the Firefox shortcut again. You should see the public portal login prompt again.