Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Authorization Interceptor

 
Tim Sparg
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys

I have the an Authorization Interceptor that only allows something to proceed if it it has the correct role.

This is implemented as follows:



Here is a simple example of something that the interceptor will go around.




This works correctly, however the Application Server returns a HTTP 500 exception.
How would I make the server return a HTTP 401 (Unauthorised) Exception instead of the 501?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic