Hi all,
I am following the guidelines of (Create a Secure Spring REST API | Okta Developer) blog using Java and Spring Security + Okta Spring Starter to verify the Okta access token of a certain request. Everything runs fines, it can verify the token and return unauthorized (401 code) in case of the invalid access token.
But it does that verification automatically and returns 401 error to User (even I debug on Filter classes or @ControllerAdvice) immediately. So, I cannot catch that exception (for logging). How can I catch that exception on my server side before it returns a 401 error to User?