<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Answers to: Logging last login of a user</title><link>https://answers.axonivy.com/questions/3871/logging-last-login-of-a-user</link><description>&lt;p&gt;In my application, users can log-in in various ways...&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;SSO: WAF via Tomcat valve &lt;/li&gt;
&lt;li&gt;SSO: IIS integration&lt;/li&gt;
&lt;li&gt;directly on the portal's login page (only for test/development systems)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Now I have the challenge to create a mechanism that can log last successful login of a user and write this information to my application DB or to the user in Ivy system DB.&lt;/p&gt;
&lt;p&gt;Which options do I have to do this?&lt;/p&gt;</description><atom:link href="https://answers.axonivy.com/questions/3871/logging-last-login-of-a-user" rel="self"></atom:link><language>en</language><lastBuildDate>Tue, 02 Jul 2019 07:46:52 -0400</lastBuildDate><item><title>Answer by Reto Weiss</title><link>https://answers.axonivy.com/questions/3871/logging-last-login-of-a-user/3872</link><description>&lt;p&gt;Hi Timo&lt;/p&gt;
&lt;p&gt;For your information there is an open feature request (XIVY-1576) that Axon.ivy should do this automatically. However, until this is implemented you can do the following:
Implement a class that implements the non public API Interface: &lt;code&gt;ch.ivyteam.ivy.security.ISessionExtension&lt;/code&gt;
Register your class with the ivy security manager during startup:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;DiCore.getGlobalInjector(ISecurityManager.class).addSessionExtension(myExtension);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;More details see here:
&lt;a href="https://answers.axonivy.com/questions/1359/detect-a-user-session-is-closing-because-of-timeout"&gt;https://answers.axonivy.com/questions/1359/detect-a-user-session-is-closing-because-of-timeout&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;
&lt;p&gt;Reto Weiss, Axon.ivy Support&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Reto Weiss</dc:creator><pubDate>Tue, 02 Jul 2019 07:46:52 -0400</pubDate><guid>https://answers.axonivy.com/questions/3871/logging-last-login-of-a-user/3872</guid></item></channel></rss>