Using Action Filters for user login in Asp.NET MVC?
- by ripper234
I recently built a site using Asp.Net.
The way I chose to implement user login is through a base 'UserAwareController' class, that all controllers extend. It contained a reference to the UserRepository, and exposed a protected GetCurrentUser() method that concrete controllers could query.
The whole process felt a bit wishy-washy to me. Is Action Filters a good alternative? What are its benefits? Is there something else I might be missing?