问题
I have an owin app which issues OAuth token to different applications. Which is using IdentityServer3 for issuing tokens. My requirement is I need to implement custom MFA for some of the apps before releasing the token. The MFA controller is a custom implementation and have a custom view. I added an MVC controller in my owin app that contains identityserver3 code, and before release the token, to app, I redirected the user to this controller method. My issue is I am not able to read the user session from the MVC controller. Which should an authenticated controller.
So far I tried is created a controller and register it using IdentityServerServiceFactory. I am not sure whether it is possible to inject an external dependency to the IdentityServer3.
来源:https://stackoverflow.com/questions/58077047/how-to-add-a-custom-mvc-controller-to-identityserver3-owin-application