I am beginning to dabble with converting several web apps over to Asp.Net Core. I started by creating a website with one page and installed it on the server and then I realized that you needed a shim to get it working with IIS. Fine, everything installed and working.
Now, I want to take that controller and require authentication to access it. I've implemented a custom STS for authenticating users and I'd like to use it for authentication in my Asp.Net Core app. This STS creates a JWT and in my other applications I utilize WIF.
I don't understand how to configure the Asp.net Core application to enable it to take advantage of WIF. Today, in my Asp.Net MVC apps I add in a line in Application_Start:
FederatedAuthentication.FederationConfigurationCreated += FederatedAuthenticationOnFederationConfigurationCreated;
In that event handler, I set the FederationConfigurationCreateEventArgs to the relevant WIF configuration.
What I don't understand now is how this works in the new world. I don't mind having a dependency on the .NET Framwork vs. .NET Core. I just have no idea where to start in terms of getting my Asp.Net Core web app to get its authentication from an STS.
Any ideas about how to get WIF working in Asp.Net Core?
AFAIK Asp.NET Core doesn't work with configuration the way WIF used to work. IN ASP.NET core you have to configure your security by registering the correct things in the pipeline. This example will give you an idea :