MVC4 Authorization

Lotok

Well-known member
Joined
Jan 17, 2012
Messages
198
Location
Scotland
Programming Experience
5-10
I am trying to get to grips with MVC so I am redoing a site in MVC 4 just as a practice.
I do not want to use the provided accounts controller which uses ASP.NET user management and roles. Instead I want to customize how users and roles are handled as a means to learn.

My question really is how to go about using the Authorize attribute, overridden I would think, to work with authentication. Currently and by default, if i was to use an [Authorize] attribute it would try to implement the default user handling and throw an exception.

Would creating a class for say NewAuthorize and inheriting Authorize be placed in models or app_code? I just need a high level idea of the steps so I can pick through them really. Would sticking with .NETs own user management be considered best practice?


Cheers
 
Last edited:
Back
Top