I am writing a custom plugin in confluence data center.
I want to read each request and capture the event , I have add a servlet filter. I wanted to add logic based- if request is been made from authenticated user or user accessed confluence without login.
I have this code to pull logged in user but it works on when servlet listener gets invoked after login, after login is done if i refresh the page, listener gets invoked but user comes as null. please advice how can i get the user from session post login.
ConfluenceUser confluenceUser = AuthenticatedUserThreadLocal.get();