4 implementations of
Microsoft.AspNetCore.Components.WebAssembly (1)
Microsoft.Extensions.Configuration (3)
38 writes to
Aspire.Hosting.Tests (29)
Microsoft.AspNetCore.HostFiltering.Tests (2)
Microsoft.AspNetCore.Hosting (2)
Microsoft.AspNetCore.Tests (2)
Microsoft.Extensions.Configuration (3)
338 references to
Aspire.Dashboard (5)
Aspire.Hosting (10)
Aspire.Hosting.Azure (8)
Aspire.Hosting.Dapr (1)
Aspire.Hosting.Testing.Tests (2)
Aspire.Hosting.Tests (5)
Benchmarks (1)
blazor-devserver (1)
CreateDefaultBuilderApp (5)
CreateDefaultBuilderOfTApp (5)
HealthChecksSample (5)
HostFilteringSample (1)
InProcessWebSite (9)
JwtBearerSample (2)
Microsoft.AspNetCore (3)
Microsoft.AspNetCore.Authentication.JwtBearer (22)
JwtBearerConfigureOptions.cs (22)
43var validateIssuer = StringHelpers.ParseValueOrDefault(configSection[nameof(TokenValidationParameters.ValidateIssuer)], bool.Parse, options.TokenValidationParameters.ValidateIssuer);
44var issuer = configSection[nameof(TokenValidationParameters.ValidIssuer)];
46var validateAudience = StringHelpers.ParseValueOrDefault(configSection[nameof(TokenValidationParameters.ValidateAudience)], bool.Parse, options.TokenValidationParameters.ValidateAudience);
47var audience = configSection[nameof(TokenValidationParameters.ValidAudience)];
50options.Authority = configSection[nameof(options.Authority)] ?? options.Authority;
51options.BackchannelTimeout = StringHelpers.ParseValueOrDefault(configSection[nameof(options.BackchannelTimeout)], _invariantTimeSpanParse, options.BackchannelTimeout);
52options.Challenge = configSection[nameof(options.Challenge)] ?? options.Challenge;
53options.ForwardAuthenticate = configSection[nameof(options.ForwardAuthenticate)] ?? options.ForwardAuthenticate;
54options.ForwardChallenge = configSection[nameof(options.ForwardChallenge)] ?? options.ForwardChallenge;
55options.ForwardDefault = configSection[nameof(options.ForwardDefault)] ?? options.ForwardDefault;
56options.ForwardForbid = configSection[nameof(options.ForwardForbid)] ?? options.ForwardForbid;
57options.ForwardSignIn = configSection[nameof(options.ForwardSignIn)] ?? options.ForwardSignIn;
58options.ForwardSignOut = configSection[nameof(options.ForwardSignOut)] ?? options.ForwardSignOut;
59options.IncludeErrorDetails = StringHelpers.ParseValueOrDefault(configSection[nameof(options.IncludeErrorDetails)], bool.Parse, options.IncludeErrorDetails);
60options.MapInboundClaims = StringHelpers.ParseValueOrDefault( configSection[nameof(options.MapInboundClaims)], bool.Parse, options.MapInboundClaims);
61options.MetadataAddress = configSection[nameof(options.MetadataAddress)] ?? options.MetadataAddress;
62options.RefreshInterval = StringHelpers.ParseValueOrDefault(configSection[nameof(options.RefreshInterval)], _invariantTimeSpanParse, options.RefreshInterval);
63options.RefreshOnIssuerKeyNotFound = StringHelpers.ParseValueOrDefault(configSection[nameof(options.RefreshOnIssuerKeyNotFound)], bool.Parse, options.RefreshOnIssuerKeyNotFound);
64options.RequireHttpsMetadata = StringHelpers.ParseValueOrDefault(configSection[nameof(options.RequireHttpsMetadata)], bool.Parse, options.RequireHttpsMetadata);
65options.SaveToken = StringHelpers.ParseValueOrDefault(configSection[nameof(options.SaveToken)], bool.Parse, options.SaveToken);
85.SingleOrDefault(key => key["Issuer"] == issuer);
86if (signingKey is not null && signingKey["Value"] is string keyValue)
Microsoft.AspNetCore.Authentication.OpenIdConnect (46)
OpenIdConnectConfigureOptions.cs (46)
43options.AccessDeniedPath = new PathString(configSection[nameof(options.AccessDeniedPath)] ?? options.AccessDeniedPath.Value);
44options.Authority = configSection[nameof(options.Authority)] ?? options.Authority;
45options.AutomaticRefreshInterval = StringHelpers.ParseValueOrDefault(configSection[nameof(options.AutomaticRefreshInterval)], _invariantTimeSpanParse, options.AutomaticRefreshInterval);
46options.BackchannelTimeout = StringHelpers.ParseValueOrDefault(configSection[nameof(options.BackchannelTimeout)], _invariantTimeSpanParse, options.BackchannelTimeout);
47options.CallbackPath = new PathString(configSection[nameof(options.CallbackPath)] ?? options.CallbackPath.Value);
48options.ClaimsIssuer = configSection[nameof(options.ClaimsIssuer)] ?? options.ClaimsIssuer;
49options.ClientId = configSection[nameof(options.ClientId)] ?? options.ClientId;
50options.ClientSecret = configSection[nameof(options.ClientSecret)] ?? options.ClientSecret;
52options.DisableTelemetry = StringHelpers.ParseValueOrDefault(configSection[nameof(options.DisableTelemetry)], bool.Parse, options.DisableTelemetry);
53options.ForwardAuthenticate = configSection[nameof(options.ForwardAuthenticate)] ?? options.ForwardAuthenticate;
54options.ForwardChallenge = configSection[nameof(options.ForwardChallenge)] ?? options.ForwardChallenge;
55options.ForwardDefault = configSection[nameof(options.ForwardDefault)] ?? options.ForwardDefault;
56options.ForwardForbid = configSection[nameof(options.ForwardForbid)] ?? options.ForwardForbid;
57options.ForwardSignIn = configSection[nameof(options.ForwardSignIn)] ?? options.ForwardSignIn;
58options.ForwardSignOut = configSection[nameof(options.ForwardSignOut)] ?? options.ForwardSignOut;
59options.GetClaimsFromUserInfoEndpoint = StringHelpers.ParseValueOrDefault(configSection[nameof(options.GetClaimsFromUserInfoEndpoint)], bool.Parse, options.GetClaimsFromUserInfoEndpoint);
60options.MapInboundClaims = StringHelpers.ParseValueOrDefault(configSection[nameof(options.MapInboundClaims)], bool.Parse, options.MapInboundClaims);
61options.MaxAge = StringHelpers.ParseValueOrDefault(configSection[nameof(options.MaxAge)], _invariantNullableTimeSpanParse, options.MaxAge);
62options.MetadataAddress = configSection[nameof(options.MetadataAddress)] ?? options.MetadataAddress;
64options.Prompt = configSection[nameof(options.Prompt)] ?? options.Prompt;
65options.RefreshInterval = StringHelpers.ParseValueOrDefault(configSection[nameof(options.RefreshInterval)], _invariantTimeSpanParse, options.RefreshInterval);
66options.RefreshOnIssuerKeyNotFound = StringHelpers.ParseValueOrDefault(configSection[nameof(options.RefreshOnIssuerKeyNotFound)], bool.Parse, options.RefreshOnIssuerKeyNotFound);
67options.RemoteAuthenticationTimeout = StringHelpers.ParseValueOrDefault(configSection[nameof(options.RemoteAuthenticationTimeout)], _invariantTimeSpanParse, options.RemoteAuthenticationTimeout);
68options.RemoteSignOutPath = new PathString(configSection[nameof(options.RemoteSignOutPath)] ?? options.RemoteSignOutPath.Value);
69options.RequireHttpsMetadata = StringHelpers.ParseValueOrDefault(configSection[nameof(options.RequireHttpsMetadata)], bool.Parse, options.RequireHttpsMetadata);
70options.Resource = configSection[nameof(options.Resource)] ?? options.Resource;
71options.ResponseMode = configSection[nameof(options.ResponseMode)] ?? options.ResponseMode;
72options.ResponseType = configSection[nameof(options.ResponseType)] ?? options.ResponseType;
73options.ReturnUrlParameter = configSection[nameof(options.ReturnUrlParameter)] ?? options.ReturnUrlParameter;
74options.SaveTokens = StringHelpers.ParseValueOrDefault(configSection[nameof(options.SaveTokens)], bool.Parse, options.SaveTokens);
76options.SignedOutCallbackPath = new PathString(configSection[nameof(options.SignedOutCallbackPath)] ?? options.SignedOutCallbackPath.Value);
77options.SignedOutRedirectUri = configSection[nameof(options.SignedOutRedirectUri)] ?? options.SignedOutRedirectUri;
78options.SignInScheme = configSection[nameof(options.SignInScheme)] ?? options.SignInScheme;
79options.SignOutScheme = configSection[nameof(options.SignOutScheme)] ?? options.SignOutScheme;
80options.SkipUnrecognizedRequests = StringHelpers.ParseValueOrDefault(configSection[nameof(options.SkipUnrecognizedRequests)], bool.Parse, options.SkipUnrecognizedRequests);
81options.UsePkce = StringHelpers.ParseValueOrDefault(configSection[nameof(options.UsePkce)], bool.Parse, options.UsePkce);
82options.UseTokenLifetime = StringHelpers.ParseValueOrDefault(configSection[nameof(options.UseTokenLifetime)], bool.Parse, options.UseTokenLifetime);
94cookieBuilder.Domain = cookieConfigSection[nameof(cookieBuilder.Domain)] ?? cookieBuilder.Domain;
95cookieBuilder.HttpOnly = StringHelpers.ParseValueOrDefault(cookieConfigSection[nameof(cookieBuilder.HttpOnly)], bool.Parse, cookieBuilder.HttpOnly);
96cookieBuilder.IsEssential = StringHelpers.ParseValueOrDefault(cookieConfigSection[nameof(cookieBuilder.IsEssential)], bool.Parse, cookieBuilder.IsEssential);
97cookieBuilder.Expiration = StringHelpers.ParseValueOrDefault(cookieConfigSection[nameof(cookieBuilder.Expiration)], _invariantNullableTimeSpanParse, cookieBuilder.Expiration);
98cookieBuilder.MaxAge = StringHelpers.ParseValueOrDefault<TimeSpan?>(cookieConfigSection[nameof(cookieBuilder.MaxAge)], _invariantNullableTimeSpanParse, cookieBuilder.MaxAge);
99cookieBuilder.Name = cookieConfigSection[nameof(CookieBuilder.Name)] ?? cookieBuilder.Name;
100cookieBuilder.Path = cookieConfigSection[nameof(CookieBuilder.Path)] ?? cookieBuilder.Path;
101cookieBuilder.SameSite = cookieConfigSection[nameof(CookieBuilder.SameSite)] is string sameSiteMode
104cookieBuilder.SecurePolicy = cookieConfigSection[nameof(CookieBuilder.SecurePolicy)] is string securePolicy
Microsoft.AspNetCore.AzureAppServices.HostingStartup (1)
Microsoft.AspNetCore.Components.Server (1)
Microsoft.AspNetCore.Components.WebAssembly.Tests (2)
Microsoft.AspNetCore.DataProtection (1)
Microsoft.AspNetCore.HostFiltering.Tests (1)
Microsoft.AspNetCore.Hosting (11)
Microsoft.AspNetCore.Hosting.Tests (13)
WebHostBuilderTests.cs (11)
331Assert.Equal("value1", context.Configuration["key1"]);
351Assert.Equal("value1", context.Configuration["key1"]);
382Assert.Equal("value1", config["key1"]);
412Assert.Equal("value1", config["key1"]);
1093Assert.Equal("value", configuration["testhostingstartup:config"]);
1113Assert.Equal("appvalue", context.Configuration["appconfig"]);
1117Assert.Equal("appvalue", context.Configuration["appconfig"]);
1121Assert.Equal("appvalue", context.Configuration["appconfig"]);
1129Assert.Equal("appvalue", configuration["appconfig"]);
1137Assert.Equal("value", config["testhostingstartup:config"]);
1338Assert.Equal("nestedvalue", appConfig["key"]);
Microsoft.AspNetCore.Hosting.TestSites (2)
Microsoft.AspNetCore.HttpsPolicy (1)
Microsoft.AspNetCore.Routing.FunctionalTests (2)
Microsoft.AspNetCore.Server.IIS (9)
Microsoft.AspNetCore.Server.IISIntegration.Tests (3)
Microsoft.AspNetCore.Server.Kestrel.Core (14)
Microsoft.AspNetCore.StaticAssets (1)
Microsoft.AspNetCore.Tests (27)
WebApplicationTests.cs (27)
1065Assert.Equal("1", app.Configuration["x"]);
1066Assert.Equal("Larry", app.Configuration["name"]);
1067Assert.Equal("20", app.Configuration["age"]);
1068Assert.Equal("Testing", app.Configuration["environment"]);
1106Assert.Equal("value", app.Configuration["A"]);
1107Assert.Equal("another", app.Configuration["B"]);
1157Assert.Equal("A", app.Configuration["A"]);
1158Assert.Equal("B", app.Configuration["B"]);
1159Assert.Equal("C", app.Configuration["C"]);
1160Assert.Equal("D", app.Configuration["D"]);
1161Assert.Equal("E", app.Configuration["E"]);
1162Assert.Equal("F", app.Configuration["F"]);
1208Assert.True(string.IsNullOrEmpty(app.Configuration["A"]));
1209Assert.True(string.IsNullOrEmpty(app.Configuration["C"]));
1211Assert.Equal("B", app.Configuration["B"]);
1252Assert.True(string.IsNullOrEmpty(app.Configuration["B"]));
1254Assert.Equal("A", app.Configuration["A"]);
1279Assert.Equal("A", app.Configuration["A"]);
1280Assert.Equal("B", app.Configuration["B"]);
1433Assert.Equal("bar", app.Configuration["foo"]);
1535Assert.Equal("bar", config["foo"]);
1540Assert.Equal("bar", app.Configuration["foo"]);
2101Assert.Equal("value", app.Configuration["testhostingstartup:config"]);
2111Assert.Equal("value", app.Configuration["testhostingstartup:config"]);
2126Assert.Equal("value", app.Configuration["testhostingstartup:config"]);
2328var value0 = app.Configuration["Random"];
2330var value1 = app.Configuration["Random"];
Microsoft.Extensions.Caching.SqlServer.Tests (3)
Microsoft.Extensions.Configuration (3)
Microsoft.Extensions.Configuration.KeyPerFile.Tests (62)
ConfigurationProviderTestBase.cs (25)
199Assert.Equal(value1, config["Key1"], StringComparer.InvariantCultureIgnoreCase);
200Assert.Equal(value12, config["Section1:Key2"], StringComparer.InvariantCultureIgnoreCase);
201Assert.Equal(value123, config["Section1:Section2:Key3"], StringComparer.InvariantCultureIgnoreCase);
202Assert.Equal(arrayvalue0, config["Section1:Section2:Key3a:0"], StringComparer.InvariantCultureIgnoreCase);
203Assert.Equal(arrayvalue1, config["Section1:Section2:Key3a:1"], StringComparer.InvariantCultureIgnoreCase);
204Assert.Equal(arrayvalue2, config["Section1:Section2:Key3a:2"], StringComparer.InvariantCultureIgnoreCase);
205Assert.Equal(value344, config["Section3:Section4:Key4"], StringComparer.InvariantCultureIgnoreCase);
208Assert.Equal(value12, section1["Key2"], StringComparer.InvariantCultureIgnoreCase);
209Assert.Equal(value123, section1["Section2:Key3"], StringComparer.InvariantCultureIgnoreCase);
210Assert.Equal(arrayvalue0, section1["Section2:Key3a:0"], StringComparer.InvariantCultureIgnoreCase);
211Assert.Equal(arrayvalue1, section1["Section2:Key3a:1"], StringComparer.InvariantCultureIgnoreCase);
212Assert.Equal(arrayvalue2, section1["Section2:Key3a:2"], StringComparer.InvariantCultureIgnoreCase);
217Assert.Equal(value123, section2["Key3"], StringComparer.InvariantCultureIgnoreCase);
218Assert.Equal(arrayvalue0, section2["Key3a:0"], StringComparer.InvariantCultureIgnoreCase);
219Assert.Equal(arrayvalue1, section2["Key3a:1"], StringComparer.InvariantCultureIgnoreCase);
220Assert.Equal(arrayvalue2, section2["Key3a:2"], StringComparer.InvariantCultureIgnoreCase);
225Assert.Equal(value123, section2["Key3"], StringComparer.InvariantCultureIgnoreCase);
226Assert.Equal(arrayvalue0, section2["Key3a:0"], StringComparer.InvariantCultureIgnoreCase);
227Assert.Equal(arrayvalue1, section2["Key3a:1"], StringComparer.InvariantCultureIgnoreCase);
228Assert.Equal(arrayvalue2, section2["Key3a:2"], StringComparer.InvariantCultureIgnoreCase);
233Assert.Equal(arrayvalue0, section3a["0"], StringComparer.InvariantCultureIgnoreCase);
234Assert.Equal(arrayvalue1, section3a["1"], StringComparer.InvariantCultureIgnoreCase);
235Assert.Equal(arrayvalue2, section3a["2"], StringComparer.InvariantCultureIgnoreCase);
244Assert.Equal(value344, section4["Key4"], StringComparer.InvariantCultureIgnoreCase);
249Assert.Equal(value344, section4["Key4"], StringComparer.InvariantCultureIgnoreCase);
KeyPerFileTests.cs (37)
50Assert.Equal("SecretValue1", config["Secret1"]);
51Assert.Equal("SecretValue2", config["Secret2"]);
66Assert.Equal("SecretValue1", config["Secret1"]);
67Assert.Equal("SecretValue2", config["Secret2"]);
82Assert.Equal("SecretValue0", config["Secret0:Key"]);
83Assert.Equal("SecretValue1", config["Secret0:Secret1:Key"]);
84Assert.Equal("SecretValue2", config["Secret0:Secret1:Secret2:Key"]);
103Assert.Equal("SecretValue0", config["Secret0:Key"]);
104Assert.Equal("SecretValue1", config["Secret0:Secret1:Key"]);
105Assert.Equal("SecretValue2", config["Secret0:Secret1:Secret2:Key"]);
120Assert.Null(config["ignore.Secret0"]);
121Assert.Null(config["ignore.Secret1"]);
122Assert.Equal("SecretValue2", config["Secret2"]);
141Assert.Equal("SecretValue0", config["ignore.Secret0"]);
142Assert.Equal("SecretValue1", config["ignore.Secret1"]);
143Assert.Equal("SecretValue2", config["Secret2"]);
181Assert.Null(config["meSecret0"]);
182Assert.Null(config["meSecret1"]);
183Assert.Equal("SecretValue2", config["Secret2"]);
202Assert.Equal("SecretValue0", config["ignore.Secret0"]);
203Assert.Equal("SecretValue1", config["ignore.Secret1"]);
204Assert.Equal("SecretValue2", config["Secret2"]);
256Assert.Equal("SecretValue1", config["Secret1"]);
257Assert.Equal("SecretValue2", config["Secret2"]);
263Assert.Equal("NewSecretValue1", config["Secret1"]);
264Assert.Null(config["NewSecret2"]);
265Assert.Equal("NewSecretValue3", config["Secret3"]);
282Assert.Equal("SecretValue1", config["Secret1"]);
283Assert.Equal("SecretValue2", config["Secret2"]);
289Assert.Equal("SecretValue1", config["Secret1"]);
290Assert.Equal("SecretValue2", config["Secret2"]);
312Assert.Equal("SecretValue1", config["Secret1"]);
313Assert.Equal("SecretValue2", config["Secret2"]);
341Assert.Equal("NewSecretValue1", config["Secret1"]);
342Assert.Null(config["NewSecret2"]);
343Assert.Equal("NewSecretValue3", config["Secret3"]);
394Assert.Equal("SecretValue1", config["Secret1"]);
Microsoft.Extensions.Hosting (7)
Microsoft.Extensions.Http (19)
DependencyInjection\SocketsHttpHandlerBuilderExtensions.cs (19)
195PooledConnectionIdleTimeout = ParseTimeSpan(config[nameof(SocketsHttpHandler.PooledConnectionIdleTimeout)]),
196PooledConnectionLifetime = ParseTimeSpan(config[nameof(SocketsHttpHandler.PooledConnectionLifetime)]),
197PreAuthenticate = ParseBool(config[nameof(SocketsHttpHandler.PreAuthenticate)]),
198ResponseDrainTimeout = ParseTimeSpan(config[nameof(SocketsHttpHandler.ResponseDrainTimeout)]),
199UseCookies = ParseBool(config[nameof(SocketsHttpHandler.UseCookies)]),
200UseProxy = ParseBool(config[nameof(SocketsHttpHandler.UseProxy)]),
201EnableMultipleHttp2Connections = ParseBool(config[nameof(SocketsHttpHandler.EnableMultipleHttp2Connections)]),
202MaxResponseHeadersLength = ParseInt(config[nameof(SocketsHttpHandler.MaxResponseHeadersLength)]),
203MaxResponseDrainSize = ParseInt(config[nameof(SocketsHttpHandler.MaxResponseDrainSize)]),
204MaxConnectionsPerServer = ParseInt(config[nameof(SocketsHttpHandler.MaxConnectionsPerServer)]),
205MaxAutomaticRedirections = ParseInt(config[nameof(SocketsHttpHandler.MaxAutomaticRedirections)]),
206InitialHttp2StreamWindowSize = ParseInt(config[nameof(SocketsHttpHandler.InitialHttp2StreamWindowSize)]),
207AllowAutoRedirect = ParseBool(config[nameof(SocketsHttpHandler.AllowAutoRedirect)]),
208AutomaticDecompression = ParseEnum<DecompressionMethods>(config[nameof(SocketsHttpHandler.AutomaticDecompression)]),
209ConnectTimeout = ParseTimeSpan(config[nameof(SocketsHttpHandler.ConnectTimeout)]),
210Expect100ContinueTimeout = ParseTimeSpan(config[nameof(SocketsHttpHandler.Expect100ContinueTimeout)]),
211KeepAlivePingDelay = ParseTimeSpan(config[nameof(SocketsHttpHandler.KeepAlivePingDelay)]),
212KeepAlivePingTimeout = ParseTimeSpan(config[nameof(SocketsHttpHandler.KeepAlivePingTimeout)]),
213KeepAlivePingPolicy = ParseEnum<HttpKeepAlivePingPolicy>(config[nameof(SocketsHttpHandler.KeepAlivePingPolicy)])
Microsoft.Extensions.Logging.Console (2)
Negotiate.Server (2)
OrderProcessor (1)
OrleansServiceDefaults (1)
Playground.ServiceDefaults (1)
Seq.ServiceDefaults (1)
SimpleWebSiteWithWebApplicationBuilder (1)
SocialSample (13)
TestingAppHost1.ServiceDefaults (1)
TestShop.ServiceDefaults (1)