+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / SSO with Sitefinity and existing ASP.Net sites

SSO with Sitefinity and existing ASP.Net sites

3 posts, 1 answered
  1. Che
    Che avatar
    4 posts
    Registered:
    27 Mar 2011
    06 May 2013
    Link to this post
    Hi, I wonder if anyone has implemented SSO with non-Sitefinity sites.   The examples in the documentation are for multiple Sitefinity sites, not ordinary ASP.Net.  I have two older ASP.Net sites that are currently implementing SSO using forms authentication that I want to update to have single sign-on with a new Sitefinity site.  It looks like claims authentication should be a reasonable solution, but it's not apparent to me how to implement claims authentication in standard ASP.Net 3.5 or 4.0 that points to a Sitefinity site as the STS, or uses the same STS.  I do not see that SF implements WS federation, so the VS wizard for connecting to an STS doesn't seem to apply.  Can I do this with ordinary WIF claims authentication on the relying sites? Do I need to reference Sitefinity classes to use the token? Do I need to create a separate STS for all of the sites?
  2. Steve
    Steve avatar
    3037 posts
    Registered:
    03 Dec 2008
    06 May 2013 in reply to Che
    Link to this post
    We just hook into the logged in event in sitefinity and add the forms auth cookies manually...seems to work here :)

    Saves a custom STS and converting existing sites to claims.

                if (e.CommandName == "Bootstrapped")
                {
                    EventHub.Subscribe<ILoginCompletedEvent>(new SitefinityEventHandler<ILoginCompletedEvent>(OnLogin_Completed));
    }

            protected void OnLogin_Completed(ILoginCompletedEvent loginEvent)
            {
                switch (loginEvent.LoginResult)
                {
                    case UserLoggingReason.Success:
                        //Setup SSO Bits
                        LoginClaims.OnLoggedIn(loginEvent.Username, HttpContext.Current);
     

                        break;
     
    }
     
    }

    So this lets me integrate with Alfresco (Java based), Telligent Community Server (bloated POS .NET community software), and a plain old asp.net webapp.
    Answered
  3. Che
    Che avatar
    4 posts
    Registered:
    27 Mar 2011
    06 May 2013 in reply to Steve
    Link to this post
    Thanks! seems reasonable, especially short term.  With other sites that I may be integrating next year I'd still love to know if claims auth could be made to work.

    I'm relatively new to Sitefinity.  My SF project didn't have a global.asax, so I wasn't sure at first how to hook into this until I looked at some of the dev samples.  Is there anything special I need to know about adding a global.asax?
3 posts, 1 answered