23 writes to TokenValidationParameters
JwtSample (1)
Startup.cs (1)
32options.TokenValidationParameters =
Microsoft.AspNetCore.Authentication.JwtBearer (1)
JwtBearerConfigureOptions.cs (1)
66options.TokenValidationParameters = new()
Microsoft.AspNetCore.Authentication.Test (14)
JwtBearerTests.cs (7)
69o.TokenValidationParameters = new TokenValidationParameters() 107o.TokenValidationParameters = new TokenValidationParameters() 796o.TokenValidationParameters = new TokenValidationParameters() 816o.TokenValidationParameters = new TokenValidationParameters() 843o.TokenValidationParameters = new TokenValidationParameters() 940o.TokenValidationParameters = new TokenValidationParameters() 984o.TokenValidationParameters = new TokenValidationParameters()
JwtBearerTests_Handler.cs (7)
61o.TokenValidationParameters = new TokenValidationParameters() 98o.TokenValidationParameters = new TokenValidationParameters() 744o.TokenValidationParameters = new TokenValidationParameters() 763o.TokenValidationParameters = new TokenValidationParameters() 789o.TokenValidationParameters = new TokenValidationParameters() 885o.TokenValidationParameters = new TokenValidationParameters() 928o.TokenValidationParameters = new TokenValidationParameters()
Microsoft.AspNetCore.Http.Connections.Tests (2)
HttpConnectionDispatcherTests.cs (2)
3205options.TokenValidationParameters = 3367options.TokenValidationParameters =
Microsoft.AspNetCore.SignalR.Client.FunctionalTests (1)
Startup.cs (1)
54options.TokenValidationParameters =
Microsoft.AspNetCore.SignalR.Tests (1)
Startup.cs (1)
41options.TokenValidationParameters =
SecurityWebSite (2)
StartupWithGlobalAuthFilter.cs (1)
18options.TokenValidationParameters = BearerAuth.CreateTokenValidationParameters();
StartupWithGlobalAuthFilterWithoutEndpointRouting.cs (1)
18options.TokenValidationParameters = BearerAuth.CreateTokenValidationParameters();
SignalR.Client.FunctionalTestApp (1)
Startup.cs (1)
59options.TokenValidationParameters =
23 references to TokenValidationParameters
Microsoft.AspNetCore.Authentication.JwtBearer (5)
JwtBearerConfigureOptions.cs (2)
43var validateIssuer = StringHelpers.ParseValueOrDefault(configSection[nameof(TokenValidationParameters.ValidateIssuer)], bool.Parse, options.TokenValidationParameters.ValidateIssuer); 46var validateAudience = StringHelpers.ParseValueOrDefault(configSection[nameof(TokenValidationParameters.ValidateAudience)], bool.Parse, options.TokenValidationParameters.ValidateAudience);
JwtBearerHandler.cs (1)
242var tokenValidationParameters = Options.TokenValidationParameters.Clone();
JwtBearerPostConfigureOptions.cs (2)
23if (string.IsNullOrEmpty(options.TokenValidationParameters.ValidAudience) && !string.IsNullOrEmpty(options.Audience)) 25options.TokenValidationParameters.ValidAudience = options.Audience;
Microsoft.AspNetCore.Authentication.Test (18)
AuthenticationMiddlewareTests.cs (2)
180Assert.Equal("SomeIssuer", options.TokenValidationParameters.ValidIssuer); 181Assert.Equal(new[] { "https://localhost:5001" }, options.TokenValidationParameters.ValidAudiences);
JwtBearerTests_Handler.cs (16)
981Assert.Equal("dotnet-user-jwts", jwtBearerOptions.TokenValidationParameters.ValidIssuer); 982Assert.Equal(["dotnet-user-jwts-2"], jwtBearerOptions.TokenValidationParameters.ValidIssuers); 983Assert.Equal("http://localhost:5000", jwtBearerOptions.TokenValidationParameters.ValidAudience); 984Assert.Equal(["http://localhost:5001"], jwtBearerOptions.TokenValidationParameters.ValidAudiences); 989Assert.True(jwtBearerOptions.TokenValidationParameters.ValidateIssuerSigningKey); 992Assert.True(jwtBearerOptions.TokenValidationParameters.ValidateIssuer); 993Assert.True(jwtBearerOptions.TokenValidationParameters.ValidateAudience); 995var securityKey = Assert.Single(jwtBearerOptions.TokenValidationParameters.IssuerSigningKeys); 1022Assert.Equal(["http://localhost:5000", "https://localhost:5001"], jwtBearerOptions.TokenValidationParameters.ValidAudiences); 1049Assert.Equal(2, jwtBearerOptions.TokenValidationParameters.IssuerSigningKeys.Count()); 1050Assert.Equal(firstKey, Convert.ToBase64String(jwtBearerOptions.TokenValidationParameters.IssuerSigningKeys.OfType<SymmetricSecurityKey>().FirstOrDefault()?.Key)); 1051Assert.Equal(secondKey, Convert.ToBase64String(jwtBearerOptions.TokenValidationParameters.IssuerSigningKeys.OfType<SymmetricSecurityKey>().LastOrDefault()?.Key)); 1070Assert.True(jwtBearerOptions.TokenValidationParameters.ValidateIssuer); 1071Assert.True(jwtBearerOptions.TokenValidationParameters.ValidateAudience); 1092Assert.False(jwtBearerOptions.TokenValidationParameters.ValidateIssuer); 1093Assert.False(jwtBearerOptions.TokenValidationParameters.ValidateAudience);