4 instantiations of JwtBearerOptions
Microsoft.AspNetCore.Authentication.Test (4)
JwtBearerTests.cs (2)
126var options = new JwtBearerOptions(); 147var options = new JwtBearerOptions();
JwtBearerTests_Handler.cs (2)
116var options = new JwtBearerOptions(); 137var options = new JwtBearerOptions();
66 references to JwtBearerOptions
Aspire.Keycloak.Authentication (5)
AspireKeycloakExtensions.cs (5)
52/// <param name="configureOptions">An optional action to configure the <see cref="JwtBearerOptions"/>.</param> 57public static AuthenticationBuilder AddKeycloakJwtBearer(this AuthenticationBuilder builder, string serviceName, string realm, Action<JwtBearerOptions>? configureOptions) 67/// <param name="configureOptions">An action to configure the <see cref="JwtBearerOptions"/>.</param> 77Action<JwtBearerOptions>? configureOptions) 86.AddOptions<JwtBearerOptions>(authenticationScheme)
Aspire.Keycloak.Authentication.Tests (6)
AspireKeycloakExtensionTests.cs (6)
30host.Services.GetRequiredService<IOptionsMonitor<JwtBearerOptions>>() 50host.Services.GetRequiredService<IOptionsMonitor<JwtBearerOptions>>().Get(scheme)); 70var options = host.Services.GetRequiredService<IOptionsMonitor<JwtBearerOptions>>() 92var options = host.Services.GetRequiredService<IOptionsMonitor<JwtBearerOptions>>()
Microsoft.AspNetCore.Authentication.JwtBearer (32)
AuthenticationFailedContext.cs (2)
11public class AuthenticationFailedContext : ResultContext<JwtBearerOptions> 20JwtBearerOptions options)
ForbiddenContext.cs (2)
11public class ForbiddenContext : ResultContext<JwtBearerOptions> 20JwtBearerOptions options)
JwtBearerChallengeContext.cs (4)
11public class JwtBearerChallengeContext : PropertiesContext<JwtBearerOptions> 20JwtBearerOptions options, 32/// <see cref="JwtBearerOptions.IncludeErrorDetails"/> is set to <c>false</c>. 39/// <see cref="JwtBearerOptions.IncludeErrorDetails"/> is set to <c>false</c>.
JwtBearerConfigureOptions.cs (3)
13internal sealed class JwtBearerConfigureOptions : IConfigureNamedOptions<JwtBearerOptions> 29public void Configure(string? name, JwtBearerOptions options) 94public void Configure(JwtBearerOptions options)
JwtBearerDefaults.cs (1)
12/// Default value for AuthenticationScheme property in the <see cref="JwtBearerOptions"/>.
JwtBearerExtensions.cs (9)
46/// <param name="configureOptions">A delegate that allows configuring <see cref="JwtBearerOptions"/>.</param> 48public static AuthenticationBuilder AddJwtBearer(this AuthenticationBuilder builder, Action<JwtBearerOptions> configureOptions) 59/// <param name="configureOptions">A delegate that allows configuring <see cref="JwtBearerOptions"/>.</param> 61public static AuthenticationBuilder AddJwtBearer(this AuthenticationBuilder builder, string authenticationScheme, Action<JwtBearerOptions> configureOptions) 73/// <param name="configureOptions">A delegate that allows configuring <see cref="JwtBearerOptions"/>.</param> 75public static AuthenticationBuilder AddJwtBearer(this AuthenticationBuilder builder, string authenticationScheme, string? displayName, Action<JwtBearerOptions> configureOptions) 77builder.Services.TryAddEnumerable(ServiceDescriptor.Singleton<IConfigureOptions<JwtBearerOptions>, JwtBearerConfigureOptions>()); 78builder.Services.TryAddEnumerable(ServiceDescriptor.Singleton<IPostConfigureOptions<JwtBearerOptions>, JwtBearerPostConfigureOptions>()); 79return builder.AddScheme<JwtBearerOptions, JwtBearerHandler>(authenticationScheme, displayName, configureOptions);
JwtBearerHandler.cs (3)
20public class JwtBearerHandler : AuthenticationHandler<JwtBearerOptions> 27public JwtBearerHandler(IOptionsMonitor<JwtBearerOptions> options, ILoggerFactory logger, UrlEncoder encoder, ISystemClock clock) 35public JwtBearerHandler(IOptionsMonitor<JwtBearerOptions> options, ILoggerFactory logger, UrlEncoder encoder)
JwtBearerOptions.cs (1)
27/// Initializes a new instance of <see cref="JwtBearerOptions"/>.
JwtBearerPostConfigureOptions.cs (3)
12/// Used to setup defaults for all <see cref="JwtBearerOptions"/>. 14public class JwtBearerPostConfigureOptions : IPostConfigureOptions<JwtBearerOptions> 21public void PostConfigure(string? name, JwtBearerOptions options)
MessageReceivedContext.cs (2)
11public class MessageReceivedContext : ResultContext<JwtBearerOptions> 20JwtBearerOptions options)
TokenValidatedContext.cs (2)
12public class TokenValidatedContext : ResultContext<JwtBearerOptions> 21JwtBearerOptions options)
Microsoft.AspNetCore.Authentication.Test (23)
AuthenticationMiddlewareTests.cs (2)
179var options = app.Services.GetService<IOptionsMonitor<JwtBearerOptions>>().Get(JwtBearerDefaults.AuthenticationScheme);
JwtBearerTests.cs (6)
27public class JwtBearerTests : SharedAuthenticationTests<JwtBearerOptions> 34protected override void RegisterAuth(AuthenticationBuilder services, Action<JwtBearerOptions> configure) 43private void ConfigureDefaults(JwtBearerOptions o) 126var options = new JwtBearerOptions(); 147var options = new JwtBearerOptions(); 1159private static async Task<IHost> CreateHost(Action<JwtBearerOptions> options = null, Func<HttpContext, Func<Task>, Task> handlerBeforeAuth = null)
JwtBearerTests_Handler.cs (15)
27public class JwtBearerTests_Handler : SharedAuthenticationTests<JwtBearerOptions> 34protected override void RegisterAuth(AuthenticationBuilder services, Action<JwtBearerOptions> configure = null) 116var options = new JwtBearerOptions(); 137var options = new JwtBearerOptions(); 980var jwtBearerOptions = sp.GetRequiredService<IOptionsMonitor<JwtBearerOptions>>().Get(JwtBearerDefaults.AuthenticationScheme); 1021var jwtBearerOptions = sp.GetRequiredService<IOptionsMonitor<JwtBearerOptions>>().Get(JwtBearerDefaults.AuthenticationScheme); 1048var jwtBearerOptions = sp.GetRequiredService<IOptionsMonitor<JwtBearerOptions>>().Get(JwtBearerDefaults.AuthenticationScheme); 1068var jwtBearerOptions = sp.GetRequiredService<IOptionsMonitor<JwtBearerOptions>>().Get(JwtBearerDefaults.AuthenticationScheme); 1090var jwtBearerOptions = sp.GetRequiredService<IOptionsMonitor<JwtBearerOptions>>().Get(JwtBearerDefaults.AuthenticationScheme); 1226private static async Task<IHost> CreateHost(Action<JwtBearerOptions> options = null, Func<HttpContext, Func<Task>, Task> handlerBeforeAuth = null)