Reputation: 73
I Have multiple identity providers defined to work with my AuthServices, Each of them send a SamlResponse to my AssertionService as is supposed to then redirect to my RedirectUrl like "ExternalLoginCallback" that is defined in Sustainsys.Saml2.StubIdp example. I have no way to know witch of Identity provider returned the externalIdentity, I have to check that the current user belongs this idp.
I hope I don't have to force them to send a special claim with there Idp Id or something like that.
Does it exist a way to pass the entityId between Acs to my callback action ?
thanks
Upvotes: 0
Views: 294
Reputation: 73
Ok I found the answer...
I extract idp id from Claim Issuer like this :
var externalIdentity = context.Authentication.GetExternalIdentity(ExternalCookie.Name);
var idp = externalIdentity.FindFirst(AuthServicesClaimTypes.LogoutNameIdentifier)?.Issuer;
Upvotes: 1