Expand my Community achievements bar.

Join expert-led, customer-led sessions on Adobe Experience Manager Assets on August 20th at our Skill Exchange.

How can I access the current AEM session expiry time?

Avatar

Level 2
Hi All,
I'm currently working on a use case where I need to retrieve the token expiry time for the current user in AEM. Based on my understanding, this information is stored at the path: /home/users//.tokens/ (specifically, the rep:token.exp property).
This works as expected in the Author and RDE environments. However, on the AEM as a Cloud Publisher instance(dev/stage/prod), I don’t see this node at all—it appears that the .tokens node is either hidden or not accessible in this environment.
Has anyone come across this issue or identified an alternative approach to retrieve the token expiry (rep:token.exp) or determine the current user session expiry on the Publisher?
Any insights or suggestions would be greatly appreciated.
Topics

Topics help categorize Community content and increase your ability to discover relevant content.

5 Replies

Avatar

Level 3

Hi @Sku4 

Good Day!

First of all let me know is your Publisher Instance accessible to other users (other than admin), have you created users in Publisher environment as well..?
If that is the case then you can find the tokens stored under the /home/users folder. 

Ideally we do not create a users for the Publisher environments. 

Avatar

Level 3

If you want to check the same, try creating a dummy user in the Dev environment Publisher instance and login via a other browser, you will be able to see the tokens for the user under /home/users in Publisher as well. 

Basically if no user exists in the pub instance then there will not be any data under the /home/users except for the admin.  

Avatar

Level 2

Hi @Nitesh-Chavan , Thank you for the response,

I do not see tokens node for any user in publisher. I could see only in local/RDE, but not in Dev/Stage/Prod. I tried printing token node path, it says node does not exists. 

Avatar

Level 3

I hope you are logging in with Admin credentials while doing this activity, if not please login with Admin credentials. May I know how you are printing token node paths? What approach you are using for it. 

Avatar

Administrator

@Sku4 Just checking in — were you able to resolve your issue?
We’d love to hear how things worked out. If the suggestions above helped, marking a response as correct can guide others with similar questions. And if you found another solution, feel free to share it — your insights could really benefit the community. Thanks again for being part of the conversation!



Kautuk Sahni