I need to modify the InResponseTo value in a testing environment based on a checkbox if it’s checked the IDP would send a modified InResposneT value so that I get an exception.
I’m using .net core
You can use the OnSamlResponseCreated event to update the SAML response.
_samlIdentityProvider.Events.OnSamlResponseCreated += (HttpContext, samlResponse) =>
{
samlResponse.InResponseTo = “wrong”;
return samlResponse;
};
return _samlIdentityProvider.SendSsoAsync(userName, attributes);