Jul 27th, 2012, 08:36 AM
Customizing Resource Server Filters to use custom ExceptionRenderer
I have a provider configuration setup using the oauth:resource-server tag, but want to customize the way that errors are handling by using my own ExceptionRenderer that the AuthenticationEntryPoint uses. In order to do this, I have to be able to set the AuthenticationEntryPoint in the OAuth2AuthenticationProcessingFilter object.
Is there a way to set the AuthenticationEntryPoint with the oauth:resource-server tag, or do I need to remove this tag altogether and manually create the filters that this tag creates? If so, how do I figure out which beans this tag creates? I can't find it in the docs.
The reason for customizing this is that my RESTful API uses extensions (.json,.xml, etc.) to determine content to return, and ignores the Accept headers. The DefaultOAuth2ExceptionRenderer bases content type on Accept header only.
Tags for this Thread