We have an application that is Integrated with ADFS and is in .net framework. We have multiple Identity providers who we trust and give access to the application. We used to accommodate them by reading the whr value in the querystring and ading a parameter to the sign in request as follows
public void WSFederationAuthenticationModule_RedirectingToIdentityProvider(object sender, RedirectingToIdentityProviderEventArgs e)
{
string strWhr = HttpContext.Current.Request.QueryString["whr"];
if (strWhr != null)
{
e.SignInRequestMessage.Parameters.Add("RedirectToIdentityProvider", strWhr);
}
}
We are now migrating our app to .net core. How do we achieve the same using middleware. I have read that we could use the Events.RedirectToIdentityProvider from the WsFederationOptions Class and achieve it but am not able to figure it out. Any help will be greatly appreciated. Thanks a lot.