Using the Authorize atribute

Topics: Web Api
Oct 6, 2011 at 9:20 PM

How can i use the MVC [Authorize] Attribute with WebApi

Oct 6, 2011 at 10:01 PM

You cannot use MVC's [Authorize] attribute directly.

However, it is not hard to have a similar behavior with operation handlers.

Take a look at: (note the ".CheckAuthorization();" on the configuration)