Hi Friends,
please help understand how we can detect the user session expiration programmatically and show alert box whether to continue or end the login user session?
We have enabled Azure SAML and after session is timed out, user is getting "Authentication Failed" message and nothing else when accessing same page.
How we can detect session expiry or presence of cookie and act accordingly(Redirect the user or some popup with link)?
Please help
Solved! Go to Solution.
Views
Replies
Total Likes
Hi @akhilraj
You can check the resourceResolver in servlet from request, if null that means no session
ResourceResolver resourceResolver = request.getResourceResolver();
Unfortunately, I can't access that code anymore.
We had implemented a ajax call(every 5 second) to a servlet e.g. sessionCheck and based on response we redirected user to login page.
The sessionCheck servlet check if user is logged in or not based on the cookie or getting session in AEM based on request.
You can't check/access secure cookies at clientside. you have to make a call to server side to check the cookie or user status.
Thanks @arunpatidar ,
If you can share some code snippet based on it, will be helpful.
Hi @akhilraj
You can check the resourceResolver in servlet from request, if null that means no session
ResourceResolver resourceResolver = request.getResourceResolver();
Unfortunately, I can't access that code anymore.
Thanks @arunpatidar ,
We will check the same.
Views
Likes
Replies