What is the best approach to achieve saml2.0 in ASP.NetCore2.1 MVC application?
i am using Sustainsys.AspNetCore2.1Saml2 nuget, below is code. but the EntityId in it requires System.IdentityModel.dll 4.0 sounds like i am not able to run the application it shows below error.
Code
services.AddAuthentication()
.AddSaml2(options =>
{
options.SPOptions.EntityId = new EntityId("https://localhost:44349/Saml2");
options.IdentityProviders.Add(
new IdentityProvider(
new EntityId("http://localhost:59410//Metadata"), options.SPOptions)
{
LoadMetadata = true
});
options.SPOptions.ServiceCertificates.Add(new X509Certificate2("Sustainsys.Saml2.Tests.pfx"));
});
i am getting below error