1

I have been able to integrate ItFoxtec .net core nuget into my application, it redirects and gets the appropriate SAML response back along with the claims and I used ClaimsTransform to add the claims. I can see the claims from the SAML response. However, when i inspect the User object, I do not see any claims for the user and the authentication property as well shows false.

In our application at startup, we have below block.. could this be causing the claims to be reset?

services.AddIdentity<MyUser, MyRole>(options => 
                    {
                        options.Stores.MaxLengthForKeys = 128;
                        options.Stores.ProtectPersonalData = true;
                    })
                    .AddEntityFrameworkStores<MyEntities>()
                    .AddDefaultTokenProviders()
                    .AddClaimsPrincipalFactory<MyClaimsIdentityFactory>()
                    .AddSignInManager<MySignInManager>()
                    .AddUserStore<MyUserStore>()
                    .AddUserManager<MyUserManager>()
                    .AddUserValidator<MyUserValidator<MyUser>>();

I saw a similar post but the solution there did not help..

Missing SAML2 claims

Praveen
  • 31
  • 1

1 Answers1

0

Yes, I think the problem is caused by both using the SAML and ASP.NET Identity infrastructure. Maybe it is possible to combine it somehow, but I haven’t tried it.

Anders Revsgaard
  • 3,636
  • 1
  • 9
  • 25