I am attempting to secure my Spring Boot service with KeyCloak using the keycloak-adapter. I have been able to secure my endpoints. The issue I have is when I hit the endpoint using an expired/invalid token, I receive a 404 Not Found error. I was expecting a 401 exception instead. I am sure I am just missing something. Any ideas?
I figured out my issue. I believe there was a conflict with spring security which I had as one of my dependencies. I removed this dependency, and my issue was resolved.