<commit_before>Windows Authentication
======================

On supported platforms, you can use IdentityServer to authenticate users using Windows authentication (e.g. against Active Directory).
Currently Windows authentication is available when you host IdentityServer using:

* `Kestrel <https://docs.microsoft.com/en-us/aspnet/core/fundamentals/servers/kestrel>`_ on Windows using IIS and the IIS integration package
* `HTTP.sys <https://docs.microsoft.com/en-us/aspnet/core/fundamentals/servers/httpsys>`_ server on Windows
* The Negotiate authentication handler from Microsoft (required .NET Core 3.x or higher)

In all cases, Windows authentication is triggered by using the ``ChallengeAsync`` API on the ``HttpContext``.

The account controller in our `quickstart UI <https://github.com/IdentityServer/IdentityServer4.Quickstart.UI>`_ implements the necessary logic.

Using Kestrel
^^^^^^^^^^^^^
When using Kestrel, you must run "behind" IIS and use the IIS integration::<commit_msg>Update windows.rst<commit_after>Windows Authentication
======================

On supported platforms, you can use IdentityServer to authenticate users using Windows authentication (e.g. against Active Directory).
Currently Windows authentication is available when you host IdentityServer using:

* `Kestrel <https://docs.microsoft.com/en-us/aspnet/core/fundamentals/servers/kestrel>`_ on Windows using IIS and the IIS integration package
* `HTTP.sys <https://docs.microsoft.com/en-us/aspnet/core/fundamentals/servers/httpsys>`_ server on Windows
* The Negotiate authentication handler from Microsoft (requires .NET Core 3.x or higher)

In all cases, Windows authentication is triggered by using the ``ChallengeAsync`` API on the ``HttpContext``.

The ``ExternalController`` in our `quickstart UI <https://github.com/IdentityServer/IdentityServer4.Quickstart.UI>`_ implements the necessary logic.

Using Kestrel
^^^^^^^^^^^^^
When using Kestrel, you must run "behind" IIS and use the IIS integration::
{'fraction_non_alphanumeric': 0.11590566984445559, 'fraction_numerical': 0.002007024586051179, 'mean_word_length': 5.828767123287672, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7022396', 'n_tokens_mistral': 539, 'n_tokens_neox': 507, 'n_words': 197}