For this post, I am using the ComponentSpace ExampleServiceProvider as the SP and idsrv4 with the ComponentSpace NuGet package as the IDP.

The official documentation is here. Follow those instructions (the idsrv4 as IDP is the second part) but take the following into account.

For idsrv4, I used this. This is the idsrv4 code plus a command line Host program that you can configure. Note this is .NET Core 2.1.

I use this because:

  • I have all the code in one project
  • It make it easy to debug

If you go this way, you will get a VS error because the project doesn’t belong to a repository under source control. You can get round this by commenting out all the repository code in “Microsoft.Build.Tasks.Git.targets”.

The official way is to build this from a empty project as described here and here.

To test, I have two Visual Studio projects; one running idsrv4 and one running the ComponentSpace .NET Core examples. You get the examples when you purchase a licence.

Following the ComponentSpace documentation, I used the middleware approach.

Inside “Configure Services”, this needs to change as it doesn’t compile.

// Add SAML SSO services.
//services.AddSaml(Configuration.GetSection(“SAML”));
services.AddSaml(_config.GetSection(“SAML”));

I have reported this to Component Space.

Update: ComponentSpace responded:

“Build warnings

The IdentityServer4 Integration Guide will include links to example code in a couple of Gists here and here”.

This is because when I copy / pasted the code from the .pdf, I got all kinds of format errors inside VS. Some VS weirdness? So I put the code into my own gist initially.

Run the Host project in idsrv4.

Run the ExampleServiceProvider ComponentSpace project.

Click the link.

Use “alice” / “alice”.

Success!

All good!

--

--

Rory Braybrook
The new control plane

NZ Microsoft Identity dude and MVP. Azure AD/B2C/ADFS/Auth0/identityserver. StackOverflow: https://bit.ly/2XU4yvJ Presentations: http://bit.ly/334ZPt5