I have developed a custom Confluence plugin that includes a servlet with a specific URL. However, I’ve noticed that users, even those without authentication, can directly access this page via a direct link. As this page contains administrative sections, I want to secure it so that only authenticated users (preferably Confluence admins or registered users) can access it. The ideal behavior would be to redirect users to the login page if they attempt to access the URL without authentication. How can I implement this security measure in my Confluence plugin to ensure that users are authenticated before accessing the page directly?
Thanks & Regards,