So I have a spring boot application with spring security and spring data rest, along with Postgresql as the database. I've implemented JWT authentication by following the Amigoscode video tutorial.
What I want to implement next is security-based JSON output from Jackson. For instance, take the user model. I don't want to pass certain columns, say userId, when the user requesting is an anonymous or logged-in user, but I want to send these columns when the same user asks for his own data or when an admin asks for the data.
I've found the solution to do something with JsonFilter and JsonView annotations, but I have no idea how to implement them.