Closed Jenan closed 6 years ago
This may not be possible in IIS. IIS will add Windows Auth challenges to any response with a 401 status code, triggering the login prompt. This happens outside of ASP.NET and your application, you don't have much control at that point.
It should work with HttpSysServer because it's all controlled in process.
@Tratcher - it makes sense, thanks for your help!
I have tried to use the windows authentication and JWT together with .NET Core 2.1.
I have following startup settings of the authentication:
IIS settings:
I have tried following code snippet to create the JWT token with windows authentication:
And in another controller I need use only JWT authentication:
If the JWT token is expired then I correctly received the response code 401 but I still get the dialog in the browser for putting the credentials.
How can I configure the windows authentication only for a part when I want to create the JWT token and disable response which is responsible for showing the browser dialog with credentials? How to correctly combine these things?