ASP.NET Open ID Consumer Lib/Controls
ASP.NET, C# December 14th, 2007
Just found this one:
ExtremeSwank OpenID Consumer (Supports OpenID 1.1, 2.0, and extensions)
I dislike the previous one which based on JanRain, like it said:
Unfortunately, many of the complaints are that it’s written in Boo (a language based heavily on Python). While .NET is all about using whatever language you want to, Boo unfortunately requires a separate DLL for deployment, and it’s not very mainstream in the .NET world yet so that makes it somewhat difficult to justify supporting and maintaining in an existing, or new, project.
ExtremeSwank OpenID lib is a client OpenID library and User Control set written completely in C#.
There are two versions of this library:
- OpenID Consumer
Provides a fully featured OpenID 1.1 and 2.0 Consumer that supports Stateful and Stateless modes. Immediate mode is supported, but communication of data through the User Agent must be handled by the web application or a UserControl.- OpenID Simple Consumer
Provides a simplified OpenID 1.1 and 2.0 Consumer that only supports Stateless (Dumb) authentication. It has the added benefit of running on systems that require partial-trust.
Just wrote a quick sample to use ExremeSwank OpenID consumer with ASP.NET MVC, yeah, it works great !
At this time I just write some quick and dirty code, I new an OpenIDConsumer() directly from an Action method, call BeginAuth() if the requestMode is RequestedMode.None, and call renderview() if auth succ.
The better solution should implement a servlet filter alike (in ASP.NET, should be httpmodule) authentication filter to do so, I will implement it later.
–
Update:
Just read this blog: ASP.Net MVC Membership Basics, make a “RequireAuthController” as base controller class for all those action which need auth is a better idea than implement an authentication filter, maybe I will modify from his sample and add openid in.
About
[...] I am planning to add OpenID into ASP.NET MVC application, I couldn’t find a good enough place to put the OpenID authentication [...]