159 references to AuthenticationSchemes
Microsoft.AspNetCore.Server.HttpSys (17)
AuthenticationManager.cs (13)
26private AuthenticationSchemes _authSchemes; 36public AuthenticationSchemes Schemes 103if (_authSchemes != AuthenticationSchemes.None) 143internal static IList<string> GenerateChallenges(AuthenticationSchemes authSchemes) 145if (authSchemes == AuthenticationSchemes.None) 153if ((authSchemes & AuthenticationSchemes.Kerberos) == AuthenticationSchemes.Kerberos) 157if ((authSchemes & AuthenticationSchemes.Negotiate) == AuthenticationSchemes.Negotiate) 161if ((authSchemes & AuthenticationSchemes.NTLM) == AuthenticationSchemes.NTLM) 171if ((authSchemes & AuthenticationSchemes.Basic) == AuthenticationSchemes.Basic)
MessagePump.cs (1)
38if (_options.Authentication.Schemes != AuthenticationSchemes.None)
RequestProcessing\Response.cs (2)
28private AuthenticationSchemes _authChallenges; 110public AuthenticationSchemes AuthenticationChallenges
WebHostBuilderHttpSysExtensions.cs (1)
43IsEnabled = options.Authentication.Schemes != AuthenticationSchemes.None,
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (137)
AuthenticationTests.cs (101)
22[InlineData(AuthenticationSchemes.None)] 23[InlineData(AuthenticationSchemes.Negotiate)] 24[InlineData(AuthenticationSchemes.NTLM)] 26[InlineData(AuthenticationSchemes.Basic)] 27[InlineData(AuthenticationSchemes.Negotiate | AuthenticationSchemes.NTLM | /*AuthenticationSchemes.Digest |*/ AuthenticationSchemes.Basic)] 28public async Task AuthTypes_AllowAnonymous_NoChallenge(AuthenticationSchemes authType) 45[InlineData(AuthenticationSchemes.Negotiate)] 46[InlineData(AuthenticationSchemes.NTLM)] 48[InlineData(AuthenticationSchemes.Basic)] 49public async Task AuthType_RequireAuth_ChallengesAdded(AuthenticationSchemes authType) 63[InlineData(AuthenticationSchemes.Negotiate)] 64[InlineData(AuthenticationSchemes.NTLM)] 66[InlineData(AuthenticationSchemes.Basic)] 67public async Task AuthType_AllowAnonymousButSpecify401_ChallengesAdded(AuthenticationSchemes authType) 89AuthenticationSchemes.Negotiate 90| AuthenticationSchemes.NTLM 92| AuthenticationSchemes.Basic, 111[InlineData(AuthenticationSchemes.Negotiate)] 112[InlineData(AuthenticationSchemes.NTLM)] 115[InlineData(AuthenticationSchemes.Negotiate | AuthenticationSchemes.NTLM | /* AuthenticationSchemes.Digest |*/ AuthenticationSchemes.Basic)] 116public async Task AuthTypes_AllowAnonymousButSpecify401_Success(AuthenticationSchemes authType) 146[InlineData(AuthenticationSchemes.Negotiate)] 147[InlineData(AuthenticationSchemes.NTLM)] 150[InlineData(AuthenticationSchemes.Negotiate | AuthenticationSchemes.NTLM | /* AuthenticationSchemes.Digest |*/ AuthenticationSchemes.Basic)] 151public async Task AuthTypes_RequireAuth_Success(AuthenticationSchemes authType) 172var authTypes = AuthenticationSchemes.Negotiate | AuthenticationSchemes.NTLM; 195[InlineData(AuthenticationSchemes.Negotiate)] 196[InlineData(AuthenticationSchemes.NTLM)] 198[InlineData(AuthenticationSchemes.Basic)] 199[InlineData(AuthenticationSchemes.Negotiate | AuthenticationSchemes.NTLM | /*AuthenticationSchemes.Digest |*/ AuthenticationSchemes.Basic)] 200public async Task AuthTypes_AuthenticateWithNoUser_NoResults(AuthenticationSchemes authType) 220[InlineData(AuthenticationSchemes.Negotiate)] 221[InlineData(AuthenticationSchemes.NTLM)] 224[InlineData(AuthenticationSchemes.Negotiate | AuthenticationSchemes.NTLM | /*AuthenticationSchemes.Digest |*/ AuthenticationSchemes.Basic)] 225public async Task AuthTypes_AuthenticateWithUser_OneResult(AuthenticationSchemes authType) 242[InlineData(AuthenticationSchemes.Negotiate)] 243[InlineData(AuthenticationSchemes.NTLM)] 245[InlineData(AuthenticationSchemes.Basic)] 246[InlineData(AuthenticationSchemes.Negotiate | AuthenticationSchemes.NTLM | /*AuthenticationSchemes.Digest |*/ AuthenticationSchemes.Basic)] 247public async Task AuthTypes_ChallengeWithoutAuthTypes_AllChallengesSent(AuthenticationSchemes authType) 265[InlineData(AuthenticationSchemes.Negotiate)] 266[InlineData(AuthenticationSchemes.NTLM)] 268[InlineData(AuthenticationSchemes.Basic)] 269[InlineData(AuthenticationSchemes.Negotiate | AuthenticationSchemes.NTLM | /*AuthenticationSchemes.Digest |*/ AuthenticationSchemes.Basic)] 270public async Task AuthTypes_ChallengeWithAllAuthTypes_AllChallengesSent(AuthenticationSchemes authType) 290var authTypes = AuthenticationSchemes.Negotiate | AuthenticationSchemes.NTLM | /*AuthenticationSchemes.Digest |*/ AuthenticationSchemes.Basic; 306[InlineData(AuthenticationSchemes.Negotiate)] 307[InlineData(AuthenticationSchemes.NTLM)] 309[InlineData(AuthenticationSchemes.Basic)] 310[InlineData(AuthenticationSchemes.Negotiate | AuthenticationSchemes.NTLM | /*AuthenticationSchemes.Digest |*/ AuthenticationSchemes.Basic)] 311[InlineData(AuthenticationSchemes.Negotiate | AuthenticationSchemes.NTLM)] 312[InlineData(AuthenticationSchemes.Negotiate | AuthenticationSchemes.Basic)] 313[InlineData(AuthenticationSchemes.NTLM | AuthenticationSchemes.Basic)] 314public async Task AuthTypes_ChallengeWillAskForAllEnabledSchemes(AuthenticationSchemes authType) 334var authTypes = AuthenticationSchemes.Negotiate | AuthenticationSchemes.NTLM | /*AuthenticationSchemes.Digest |*/ AuthenticationSchemes.Basic; 350[InlineData(AuthenticationSchemes.Negotiate)] 351[InlineData(AuthenticationSchemes.NTLM)] 354public async Task AuthTypes_UnathorizedAuthenticatedAuthType_Unauthorized(AuthenticationSchemes authType) 372[InlineData(AuthenticationSchemes.Negotiate)] 373[InlineData(AuthenticationSchemes.NTLM)] 376[InlineData(AuthenticationSchemes.Negotiate | AuthenticationSchemes.NTLM | /* AuthenticationSchemes.Digest |*/ AuthenticationSchemes.Basic)] 377public async Task AuthTypes_DisableAutomaticAuthentication(AuthenticationSchemes authType) 404[InlineData(AuthenticationSchemes.Negotiate)] 405[InlineData(AuthenticationSchemes.NTLM)] 406[InlineData(AuthenticationSchemes.Negotiate | AuthenticationSchemes.NTLM)] 407public async Task AuthTypes_EnableKerberosCredentialCaching(AuthenticationSchemes authType) 431[InlineData(AuthenticationSchemes.Negotiate)] 432[InlineData(AuthenticationSchemes.NTLM)] 433[InlineData(AuthenticationSchemes.Negotiate | AuthenticationSchemes.NTLM)] 434public async Task AuthTypes_CaptureCredentials(AuthenticationSchemes authType)
Listener\AuthenticationOnExistingQueueTests.cs (34)
49[InlineData(AuthenticationSchemes.None)] 50[InlineData(AuthenticationSchemes.Negotiate)] 51[InlineData(AuthenticationSchemes.NTLM)] 53[InlineData(AuthenticationSchemes.Basic)] 54[InlineData(AuthenticationSchemes.Negotiate | AuthenticationSchemes.NTLM | /*AuthenticationSchemes.Digest |*/ AuthenticationSchemes.Basic)] 55public async Task AuthTypes_AllowAnonymous_NoChallenge(AuthenticationSchemes authType) 74[InlineData(AuthenticationSchemes.Negotiate)] 75[InlineData(AuthenticationSchemes.NTLM)] 77[InlineData(AuthenticationSchemes.Basic)] 78public async Task AuthType_RequireAuth_ChallengesAdded(AuthenticationSchemes authType) 92[InlineData(AuthenticationSchemes.Negotiate)] 93[InlineData(AuthenticationSchemes.NTLM)] 95[InlineData(AuthenticationSchemes.Basic)] 96public async Task AuthType_AllowAnonymousButSpecify401_ChallengesAdded(AuthenticationSchemes authType) 118AuthenticationSchemes authType = 119AuthenticationSchemes.Negotiate 120| AuthenticationSchemes.NTLM 122| AuthenticationSchemes.Basic; 141[InlineData(AuthenticationSchemes.Negotiate)] 142[InlineData(AuthenticationSchemes.NTLM)] 145[InlineData(AuthenticationSchemes.Negotiate | AuthenticationSchemes.NTLM | /*AuthenticationType.Digest |*/ AuthenticationSchemes.Basic)] 146public async Task AuthTypes_AllowAnonymousButSpecify401_Success(AuthenticationSchemes authType) 171[InlineData(AuthenticationSchemes.Negotiate)] 172[InlineData(AuthenticationSchemes.NTLM)] 175[InlineData(AuthenticationSchemes.Negotiate | AuthenticationSchemes.NTLM | /*AuthenticationType.Digest |*/ AuthenticationSchemes.Basic)] 176public async Task AuthTypes_RequireAuth_Success(AuthenticationSchemes authType) 195private HttpSysListener CreateHttpAuthServer(AuthenticationSchemes authType, bool allowAnonymous) 203private HttpSysListener CreateServerOnExistingQueue(AuthenticationSchemes authScheme, bool allowAnonymos, HttpSysListener baseServer, out string address)
Utilities.cs (2)
61internal static IServer CreateHttpAuthServer(AuthenticationSchemes authType, bool allowAnonymous, out string baseAddress, RequestDelegate app, ILoggerFactory loggerFactory) 71internal static IHost CreateDynamicHost(AuthenticationSchemes authType, bool allowAnonymous, out string root, RequestDelegate app, ILoggerFactory loggerFactory)
NegotiateAuthSample (1)
Program.cs (1)
24options.Authentication.Schemes = AuthenticationSchemes.Negotiate;
SelfHostServer (2)
Program.cs (1)
27options.Authentication.Schemes = AuthenticationSchemes.None;
Startup.cs (1)
21options.Authentication.Schemes = AuthenticationSchemes.None;
ServerComparison.TestSites (2)
Program.cs (2)
44options.Authentication.Schemes = AuthenticationSchemes.Negotiate | AuthenticationSchemes.NTLM;