OpenID in MVC

Topics: General, MVC, Standard packages
Dec 24, 2010 at 11:02 PM

In the Community OpenID xslt functions there is a call for cod:IsAuthenticated() to check credential.

It is possible to extend the functionality in MVC to check for OpenID.

I see there is a "Composite.Community.OpenID" name space i can try to include in the class.

However it seems to be an empty name space.

I would like to get user info like AccountID.

Ultimately i would like to create a webservice to host wp7 phone app but would like to test with MVC first.

Dec 25, 2010 at 1:57 AM

Looks like this does the trick

<%@ Import Namespace="Composite.Community.OpenID" %>

    <%
    Users objUser = OpenIDFacade.GetCurrentUser();
    Response.Write("<br>CurrentUser:" + objUser.DisplayName + "<br>");
    Response.Write("<br>CurrentUserID:" + objUser.Id.ToString() + "<br>");
     %>