Session Authentication

Oct 13, 2011 at 12:07 PM

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 2: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.

http://supersocket.codeplex.com/wikipage?title=Command%20Filter

 

 

 

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

Thanx, will do