Using Action Filters for user login in Asp.NET MVC?

Posted by ripper234 on Stack Overflow See other posts from Stack Overflow or by ripper234
Published on 2010-04-10T13:22:06Z Indexed on 2010/04/10 13:23 UTC
Read the original article Hit count: 244

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?

© Stack Overflow or respective owner

Related posts about web-development

Related posts about .NET