I developed a SPA with a Spring Boot API secured with auth0-spring-security-api 1.1.0 (and I’m really happy with it). For audit purposes, I would like to log all the user for all API requests. I first thought I could easily do that in a filter with
SecurityContextHolder.getContext().getAuthentication() but that returns null.
I noticed that I am not the first one trying to achieve that, unfortunately I could not find any answer so far:
- How to get user information from Auth0 using Spring Boot?
- How to retrieve user information in spring-boot service ?
How could this be achieved?