We are in the process of migration from ASP NET application to ASP NET Core 2.1 and decided to replace built-in ASP NET .UseAuthorizationServer middleware with IdentityServer4.
However, we only want to depend on IS4 in the token issuing procedure, and keep current identity-related validation routine separately from 3rd party package.
Looking at the IS4 code, all calls to its endpoints are coupled with request validator calls preceding ProcessAsync call so it looks like we cannot decouple validation from request processing and disable it completely.
Ideal solution to us would be performing request validation for identity related endpoints from the native middleware and then call an IdentityServer4 middleware to perform token issuing code. Any advice how to achieve that?
I have a very ugly suggestion. Why don't you configure your ISR4 to point to your legacy application for authentication via OIDC and then issue token using IdentityServerTools? What say?