samedi 28 février 2015

Handle exceptions produced by Spring Security with Oauth2

I have a REST API using Spring MVC and Spring Security with OAuth2. While handling exceptions produced by my controllers seems to work with a @ControllerAdvice, it seems that Exceptions produced by Spring Security must be handled otherwise. I do not want to expose the exact exception to the calling application, because it can potentially contain sensitive information. How can I handle exceptions thrown by Spring Security before the actual rendering of the exception takes place?


Aucun commentaire:

Enregistrer un commentaire