Reputation: 433
Does anyone have a "hello world" sample for an IdentityServer4 having Windows Auth along with an MVC Client using this IdentityServer4.
I've been searching online for an example without success for last 2 days and finally posting a question here for help. There are one or two examples for IdentityServer3 using Windows Auth out there but not IdentityServer4. Any help will be highly appreciated.
I've personally tried various permutations and combinations for Clients using Implitict flow and using the information on docs.identityserver.io for Windows Auth but I'm missing something very basic I feel. I always get a 401 from the MVC client and it does not even challenge and go to the ID4 server.
Upvotes: 3
Views: 2317
Reputation: 202
There is an hidden sample in this QuickStart. Follow it and ignore the Google Auth. You will see by default the only external provider is Windows Auth.
Then you just have to set false AllowLocalLogin
in Quickstart\Account\AccountOptions.cs
:
public class AccountOptions
{
public static bool AllowLocalLogin = false;
public static bool WindowsAuthenticationEnabled = true;
// etc ...
}
Now your client will automaticly use the only external provider available (Windows Auth) and login the current windows user with an implicit flow.
Upvotes: 7