简体   繁体   中英

Windows Authentication Active Directory login dialog on Dotnet Core 2

I am developing an in-house web site that needs to use Active Directory to allow users to log in. We are developing in Dotnet core V2, using Linux/Docker as the target o/s.

The client wants the 'standard' Windows authentication dialog box to appear on the web site to allow users to log in, rather than provid a web page.

I have found some code that will allow us to verify the credentials, but I somehow need to get those from Windows.

How do I make the generic login dialog appear?

In case anyone else has this question.

It's just a matter of responding to the HTTP request with a status of 401, and a header which includes:

WWW-Authenticate: NTLM

There are, of course, lots of other things to do. In dotnet core 2, I've written an AuthenticationHandler (based on code from @Win), but this was the key to getting the dialog box to be shown.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM