1 write to AuthenticationSchemes
Microsoft.AspNetCore.Authorization (1)
AuthorizationPolicy.cs (1)
39AuthenticationSchemes = new List<string>(authenticationSchemes).AsReadOnly();
34 references to AuthenticationSchemes
Aspire.Dashboard (6)
Authentication\AspirePolicyEvaluator.cs (6)
32/// Does authentication for <see cref="AuthorizationPolicy.AuthenticationSchemes"/> and sets the resulting 37/// <returns><see cref="AuthenticateResult.Success"/> unless all schemes specified by <see cref="AuthorizationPolicy.AuthenticationSchemes"/> failed to authenticate.</returns> 40if (policy.AuthenticationSchemes != null && policy.AuthenticationSchemes.Count > 0) 44foreach (var scheme in policy.AuthenticationSchemes) 68var ticket = new AuthenticationTicket(newPrincipal, string.Join(';', policy.AuthenticationSchemes));
Microsoft.AspNetCore.Authorization (1)
AuthorizationPolicyBuilder.cs (1)
96AddAuthenticationSchemesCore(policy.AuthenticationSchemes);
Microsoft.AspNetCore.Authorization.Policy (13)
AuthorizationMiddleware.cs (1)
180log.LogDebug("Policy authentication schemes {policyName} did not succeed", String.Join(", ", policy.AuthenticationSchemes));
AuthorizationMiddlewareResultHandler.cs (4)
28if (policy.AuthenticationSchemes.Count > 0) 30foreach (var scheme in policy.AuthenticationSchemes) 42if (policy.AuthenticationSchemes.Count > 0) 44foreach (var scheme in policy.AuthenticationSchemes)
IPolicyEvaluator.cs (2)
16/// Does authentication for <see cref="AuthorizationPolicy.AuthenticationSchemes"/> and sets the resulting 21/// <returns><see cref="AuthenticateResult.Success"/> unless all schemes specified by <see cref="AuthorizationPolicy.AuthenticationSchemes"/> fail to authenticate. </returns>
PolicyEvaluator.cs (6)
28/// Does authentication for <see cref="AuthorizationPolicy.AuthenticationSchemes"/> and sets the resulting 33/// <returns><see cref="AuthenticateResult.Success"/> unless all schemes specified by <see cref="AuthorizationPolicy.AuthenticationSchemes"/> failed to authenticate. </returns> 36if (policy.AuthenticationSchemes != null && policy.AuthenticationSchemes.Count > 0) 40foreach (var scheme in policy.AuthenticationSchemes) 57var ticket = new AuthenticationTicket(newPrincipal, string.Join(';', policy.AuthenticationSchemes));
Microsoft.AspNetCore.Authorization.Test (12)
AuthorizationPolicyFacts.cs (12)
37Assert.Equal(2, combined.AuthenticationSchemes.Count()); 38Assert.Contains("dupe", combined.AuthenticationSchemes); 39Assert.Contains("roles", combined.AuthenticationSchemes); 87Assert.Equal(2, combined.AuthenticationSchemes.Count()); 88Assert.Contains("dupe", combined.AuthenticationSchemes); 89Assert.Contains("default", combined.AuthenticationSchemes); 131Assert.Equal(2, combined.AuthenticationSchemes.Count()); 132Assert.Contains(combined.AuthenticationSchemes, a => a.Equals("a1")); 133Assert.Contains(combined.AuthenticationSchemes, a => a.Equals("a2")); 151Assert.Equal(2, combined.AuthenticationSchemes.Count()); 152Assert.Contains(combined.AuthenticationSchemes, a => a.Equals("a1")); 153Assert.Contains(combined.AuthenticationSchemes, a => a.Equals("a2"));
Microsoft.AspNetCore.Mvc.Core (2)
Authorization\AuthorizeFilter.cs (2)
189context.Result = new ChallengeResult(effectivePolicy.AuthenticationSchemes.ToArray()); 193context.Result = new ForbidResult(effectivePolicy.AuthenticationSchemes.ToArray());