We have a front end application developed in React and have backend services developed in ASP.NET Web API. We are using webseal (EIAM) for authentication and the way we have is we send a request to webseal using React. Webseal authenticates and send a request with user details in iis server and it will not send the request to browser for security reasons. So we could see in iis logs the user details on the request headers but I am not sure how to get those iis headers. Both React and Web Api application are hosted in iis. So do I need to write a separate .NET application to get the headers and if so how can I read the request headers coming to application pool where React is running. So what I want is to read the request sent from webseal to IIS and get the headers.
What I have tried is to use a Default.aspx page React project and I could get the header there but the Default page is called every time. I tried writing URL rewrite and see if I can set to servervariables but I might be doing it wrong it is not working. I tried to have another web api project and have a DelegatingHandler but it only works if there is a request coming to API controller, I cannot have something like check the incoming requests to iis and if the referer is xxxx and if the header iv-user is present then get those headers.