Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

How do i tarck login and logout of an AEM user in author instance ?

Avatar

Level 3

Hi Community,

 

I have a requirement where we want to track login and logout of author users in the AEM author instance , How can we do that ?

 

I tried creating a sling filter where we can check for login and logout URL, for this i am targeting j_security_check as login URL and /system/sling/logout as logout URL
I am able to get logout URL but not able to get login URL in sling filter

 

Please Help me with this or suggest some ideas to track login activity for a user 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @adivj95 

You can try implementing authenticationinfopostprocessor which will be executed after authentication has been performed.

Please find a similar implementation in the below post. When  info.getUser returns a value there you have add the custom logic . 

 

https://sling.apache.org/apidocs/sling6/org/apache/sling/auth/core/spi/AuthenticationInfoPostProcess...

 

https://medium.com/tech-learnings/adobe-experience-manager-reporting-on-users-last-login-date-e20350...

 

Hope this helps

View solution in original post

4 Replies

Avatar

Level 3

@arunpatidar 
already check this, as i have mentioned in my question , I am not able to get j_security_check url in my filter

Avatar

Correct answer by
Community Advisor

Hi @adivj95 

You can try implementing authenticationinfopostprocessor which will be executed after authentication has been performed.

Please find a similar implementation in the below post. When  info.getUser returns a value there you have add the custom logic . 

 

https://sling.apache.org/apidocs/sling6/org/apache/sling/auth/core/spi/AuthenticationInfoPostProcess...

 

https://medium.com/tech-learnings/adobe-experience-manager-reporting-on-users-last-login-date-e20350...

 

Hope this helps