Session Authentication

Oct 13, 2011 at 11:07 AM

Is it possible to implement session authentication and authorization?

I mean would this work?

if you create IsAuthenticated, Role properties on the session object which can be set to true and Admin for example by AUTH command (checking against database)

By creating a IAuthorizationFilter, we can assign the [Authorize(Roles="Admin")] to the commands just like the controllers work on MVC.

Oct 13, 2011 at 1:56 PM

Yes, you can add property IsAuthenticated in session class, and change it's value in your AUTH commands.

You can use CommandFilter to implement something like you said.




Oct 13, 2011 at 3:03 PM
Edited Oct 13, 2011 at 3:03 PM

Thanx, will do