Set up an STS

  1. Create a Web Application

    We will leverage the OAuth set up (in .net 4.5) to authenticate external users. The site also tracks internal users and allows simple user managment.

  2. Add the following references:
    • C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.IdentityModel.dll
    • C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.IdentityModel.Services.dll
  3. Add the files in STS folder from the source code:STS extensions

    These file are slightly customized from the Federation Metadata example.

  4. Edit the Constants.cs files the common name of your certificate, url and port of your STS

  5. Add the following section to the web.config:

    Meta.ashx will automatically generate the metadata document.

    The RelyingParties application setting contains a list (comman delimited) of urls of trusted RPs.

  6. Finally, add this code in the default page of the site.

    If the user is authenticated and there was a federation request the code will redirect the user to the originating relying party

comments powered by Disqus


Under Construction

About Me

Martin here. I'm a developer by choice. Focused in SharePoint & JavaScript.

  • Follow me on Twitter