Adding this question here as I'm not sure what the best programming language solution is.
I am working on my admin panel domain.com/admin and upon the admin not being on that page for lets say 5 minutes, I would like them to to be redirected to admin/lock.html the 'locked' state, this is like when you lock your computer, it asks you for your password again. It does not log them out from the website, only the admin section.
No login is currently established, I'm just looking for something simple for the time being to demonstrate. What is my best solution to be able to achieve this please?