As of today you can have seamless integration of the eID Identity Provider within your ASP.NET based web applications.
What you need is:
- some Windows operating system
- Visual Studio 2008 SP1
- Windows Identity Foundation SDK
Fire up Visual Studio. Create an ASP.NET web application via File -> New Web Site... -> ASP.NET Web Site (Language: Visual C#) -> OK
Right-click in the Solution Explorer on the web application and choose "Add STS Reference...". Say Next and then select "Use an existing STS". For STS WS-Federation metadata document location you fill in:
https://www.e-contract.be/eid-idp/endpoints/ws-federation-metadata.xml
Continue the WIF wizard until finished.
Add the following line to the Default.aspx page:
<input runat="server" id="name" />
Open the underlying Default.aspx.cs page code file and add the following to the Page_Load method:
IClaimsPrincipal principal = Thread.CurrentPrincipal as IClaimsPrincipal;
this.name.Value = principal.Identity.Name;
For this you also need the following includes on the top of the file:
using System.Threading;
using Microsoft.IdentityModel.Claims;
Hit F5, sit back and watch the show!
Many thanks to Vittorio Bertocci for giving an excellent introduction to WS-Federation and ASP.NET at the Windows Identity Foundation Workshop last March here in Brussels.
Kind Regards,
Frank.
Below, for a lazy VB-developer :-)
Imports System.Threading
Imports Microsoft.IdentityModel.Claims
Partial Class _Default
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load
Dim objPrincipal As IClaimsPrincipal = Thread.CurrentPrincipal
name.Value = objPrincipal.Identity.Name
End Sub
End Class
Dear ASP.NET developer,
Kind Regards,
Frank.
--
You received this message because you are subscribed to the Google Groups
"eID Applet" group.
To post to this group, send email to eid-a...@googlegroups.com.
To unsubscribe from this group, send email to
eid-applet+...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/eid-applet?hl=en.