This is a mirror of official site: http://jasper-net.blogspot.com/

OpenID for ASP.NET MVC, A Quick Setup

| Sunday, October 10, 2010
  I went around the internet looking for a quick tutorial setting up DotNetOpenAuth for a project. No big surprise everything I ran into was either too confusing to follow or filled with useless information.

If you need to get your ASP.NET MVC website setup with some basic OpenID Authentication, I can help get you started. All you need is a DLL, a view, and two controller actions.

First download the latest DotNetOpenAuth and extract the zip file. Let’s start.

Add DotNetOpenAuth-X.X.X.XXXXX/Bin/DotNetOpenAuth.dll to your project references. (DotNetOpenAuth.dll is the only runtime dependency you will need; everything else is described in the README.Bin.html.)

Let’s create the authentication page, what’s important here is the form, add something like this to your login page:

<form action="/Authentication/Authenticate" method="post">

<label for="openid_identifier">OpenID: </label>
<input id="openid_identifier" name="openid_identifier" />
<input type="submit" value="Login" />
</form>

There are a lot of good plugins, that have images to pre-populate this one input field.

Read more: AndrewBlogs

Posted via email from .NET Info

0 comments: