These forums have been archived and are now read-only.

The new forums are live and can be found at https://forums.eveonline.com/

EVE Technology Lab

 
  • Topic is locked indefinitely.
 

ASP.NET MVC Authentication

Author
Talaan Stardrifter
State War Academy
Caldari State
#1 - 2011-11-17 05:22:06 UTC
Is anyone using MVC?

I'm trying to find an elegant solution to MVC Authorisation using IGB headers.
Yes, i know they're not secure, but that doesn't matter for my purposes.

I'm about to start implementing a custom MembershipProvider, but if someone has it done already I'd be happy to accept advice. (or sample code Lol)
Talaan Stardrifter
State War Academy
Caldari State
#2 - 2011-11-24 13:55:19 UTC
For those interested, it seems the easiest way has been to define a Model that will contain all the header info and then use a custom Model Binder to populate (hydrate?) it from the request params.

I think things should start moving along rapidly now =)
Nisd
Viziam
Amarr Empire
#3 - 2011-11-25 13:59:39 UTC
Well, you could in your global file on request_begin look if the head is defined, and if it was call the FormsAuthentication create cookie with the eve username.

Then you would be able to use things like Request.IsAuthenticated and such
Talaan Stardrifter
State War Academy
Caldari State
#4 - 2011-11-25 14:11:54 UTC
I bit the bullet and actually spent money on a reference book after feeling like a dunce watching all the online tutorials and getting nowhere.

Anyway, what I've discovered is that I have to mash my properties and types around a bit, but I can write custom Membership, Role,and Profile Providers to do everything I need. This then allows me to keep with standard markup of using [Authorized] attributes on Actions and thus all the built-in handlers still work.

I guess this is where the real work starts =)