8 instantiations of CookieAuthenticationOptions
Microsoft.AspNetCore.Identity.Test (8)
SecurityStampValidatorTest.cs (8)
64var context = new CookieValidatePrincipalContext(httpContext.Object, new AuthenticationSchemeBuilder(IdentityConstants.ApplicationScheme) { HandlerType = typeof(NoopHandler) }.Build(), new CookieAuthenticationOptions(), ticket); 86var context = new CookieValidatePrincipalContext(httpContext.Object, new AuthenticationSchemeBuilder(IdentityConstants.ApplicationScheme) { HandlerType = typeof(NoopHandler) }.Build(), new CookieAuthenticationOptions(), ticket); 144var context = new CookieValidatePrincipalContext(httpContext.Object, new AuthenticationSchemeBuilder(IdentityConstants.ApplicationScheme) { HandlerType = typeof(NoopHandler) }.Build(), new CookieAuthenticationOptions(), ticket); 185var context = new CookieValidatePrincipalContext(httpContext.Object, new AuthenticationSchemeBuilder(IdentityConstants.ApplicationScheme) { HandlerType = typeof(NoopHandler) }.Build(), new CookieAuthenticationOptions(), ticket); 226var context = new CookieValidatePrincipalContext(httpContext.Object, new AuthenticationSchemeBuilder(IdentityConstants.ApplicationScheme) { HandlerType = typeof(NoopHandler) }.Build(), new CookieAuthenticationOptions(), ticket); 263var context = new CookieValidatePrincipalContext(httpContext.Object, new AuthenticationSchemeBuilder(IdentityConstants.ApplicationScheme) { HandlerType = typeof(NoopHandler) }.Build(), new CookieAuthenticationOptions(), ticket); 306new CookieAuthenticationOptions() { SlidingExpiration = false }, ticket); 350var context = new CookieValidatePrincipalContext(httpContext.Object, new AuthenticationSchemeBuilder(IdentityConstants.ApplicationScheme) { HandlerType = typeof(NoopHandler) }.Build(), new CookieAuthenticationOptions(), ticket);
71 references to CookieAuthenticationOptions
Cookies (4)
ConfigureMyCookie.cs (3)
9internal class ConfigureMyCookie : IConfigureNamedOptions<CookieAuthenticationOptions> 16public void Configure(string name, CookieAuthenticationOptions options) 25public void Configure(CookieAuthenticationOptions options)
Startup.cs (1)
44services.AddSingleton<IConfigureOptions<CookieAuthenticationOptions>, ConfigureMyCookie>();
CookieSessionSample (1)
Startup.cs (1)
22services.AddOptions<CookieAuthenticationOptions>(CookieAuthenticationDefaults.AuthenticationScheme)
Microsoft.AspNetCore.Authentication.Cookies (39)
CookieAuthenticationEvents.cs (8)
42public Func<RedirectContext<CookieAuthenticationOptions>, Task> OnRedirectToLogin { get; set; } = context => 59public Func<RedirectContext<CookieAuthenticationOptions>, Task> OnRedirectToAccessDenied { get; set; } = context => 76public Func<RedirectContext<CookieAuthenticationOptions>, Task> OnRedirectToLogout { get; set; } = context => 92public Func<RedirectContext<CookieAuthenticationOptions>, Task> OnRedirectToReturnUrl { get; set; } = context => 145public virtual Task RedirectToLogout(RedirectContext<CookieAuthenticationOptions> context) => OnRedirectToLogout(context); 151public virtual Task RedirectToLogin(RedirectContext<CookieAuthenticationOptions> context) => OnRedirectToLogin(context); 157public virtual Task RedirectToReturnUrl(RedirectContext<CookieAuthenticationOptions> context) => OnRedirectToReturnUrl(context); 163public virtual Task RedirectToAccessDenied(RedirectContext<CookieAuthenticationOptions> context) => OnRedirectToAccessDenied(context);
CookieAuthenticationHandler.cs (8)
18public class CookieAuthenticationHandler : SignInAuthenticationHandler<CookieAuthenticationOptions> 39/// <param name="options">Accessor to <see cref="CookieAuthenticationOptions"/>.</param> 44public CookieAuthenticationHandler(IOptionsMonitor<CookieAuthenticationOptions> options, ILoggerFactory logger, UrlEncoder encoder, ISystemClock clock) 51/// <param name="options">Accessor to <see cref="CookieAuthenticationOptions"/>.</param> 54public CookieAuthenticationHandler(IOptionsMonitor<CookieAuthenticationOptions> options, ILoggerFactory logger, UrlEncoder encoder) 443new RedirectContext<CookieAuthenticationOptions>(Context, Scheme, Options, properties, redirectUri)); 470var redirectContext = new RedirectContext<CookieAuthenticationOptions>(Context, Scheme, Options, properties, BuildRedirectUri(accessDeniedUri)); 484var redirectContext = new RedirectContext<CookieAuthenticationOptions>(Context, Scheme, Options, properties, BuildRedirectUri(loginUri));
CookieAuthenticationOptions.cs (1)
10/// Configuration options for <see cref="CookieAuthenticationOptions"/>.
CookieExtensions.cs (9)
48/// <param name="configureOptions">A delegate to configure <see cref="CookieAuthenticationOptions"/>.</param> 50public static AuthenticationBuilder AddCookie(this AuthenticationBuilder builder, Action<CookieAuthenticationOptions> configureOptions) 61/// <param name="configureOptions">A delegate to configure <see cref="CookieAuthenticationOptions"/>.</param> 63public static AuthenticationBuilder AddCookie(this AuthenticationBuilder builder, string authenticationScheme, Action<CookieAuthenticationOptions> configureOptions) 75/// <param name="configureOptions">A delegate to configure <see cref="CookieAuthenticationOptions"/>.</param> 77public static AuthenticationBuilder AddCookie(this AuthenticationBuilder builder, string authenticationScheme, string? displayName, Action<CookieAuthenticationOptions> configureOptions) 79builder.Services.TryAddEnumerable(ServiceDescriptor.Singleton<IPostConfigureOptions<CookieAuthenticationOptions>, PostConfigureCookieAuthenticationOptions>()); 80builder.Services.AddOptions<CookieAuthenticationOptions>(authenticationScheme).Validate(o => o.Cookie.Expiration == null, "Cookie.Expiration is ignored, use ExpireTimeSpan instead."); 81return builder.AddScheme<CookieAuthenticationOptions, CookieAuthenticationHandler>(authenticationScheme, displayName, configureOptions);
CookieSignedInContext.cs (2)
12public class CookieSignedInContext : PrincipalContext<CookieAuthenticationOptions> 27CookieAuthenticationOptions options)
CookieSigningInContext.cs (2)
12public class CookieSigningInContext : PrincipalContext<CookieAuthenticationOptions> 26CookieAuthenticationOptions options,
CookieSigningOutContext.cs (2)
11public class CookieSigningOutContext : PropertiesContext<CookieAuthenticationOptions> 24CookieAuthenticationOptions options,
CookieSlidingExpirationContext.cs (2)
11public class CookieSlidingExpirationContext : PrincipalContext<CookieAuthenticationOptions> 22public CookieSlidingExpirationContext(HttpContext context, AuthenticationScheme scheme, CookieAuthenticationOptions options,
CookieValidatePrincipalContext.cs (2)
12public class CookieValidatePrincipalContext : PrincipalContext<CookieAuthenticationOptions> 21public CookieValidatePrincipalContext(HttpContext context, AuthenticationScheme scheme, CookieAuthenticationOptions options, AuthenticationTicket ticket)
PostConfigureCookieAuthenticationOptions.cs (3)
10/// Used to setup defaults for all <see cref="CookieAuthenticationOptions"/>. 12public class PostConfigureCookieAuthenticationOptions : IPostConfigureOptions<CookieAuthenticationOptions> 30public void PostConfigure(string? name, CookieAuthenticationOptions options)
Microsoft.AspNetCore.Authentication.Test (6)
CookieTests.cs (6)
23public class CookieTests : SharedAuthenticationTests<CookieAuthenticationOptions> 30protected override void RegisterAuth(AuthenticationBuilder services, Action<CookieAuthenticationOptions> configure) 292var options = services.BuildServiceProvider().GetRequiredService<IOptionsMonitor<CookieAuthenticationOptions>>(); 1304services.Configure<CookieAuthenticationOptions>(CookieAuthenticationDefaults.AuthenticationScheme, 1332services.Configure<CookieAuthenticationOptions>("Cookie1", 1793private Task<IHost> CreateHost(Action<CookieAuthenticationOptions> configureOptions, Func<HttpContext, Task> testpath = null, Uri baseAddress = null, bool claimsTransform = false)
Microsoft.AspNetCore.Identity (16)
IdentityCookiesBuilder.cs (4)
17public OptionsBuilder<CookieAuthenticationOptions>? ApplicationCookie { get; set; } 22public OptionsBuilder<CookieAuthenticationOptions>? ExternalCookie { get; set; } 27public OptionsBuilder<CookieAuthenticationOptions>? TwoFactorRememberMeCookie { get; set; } 32public OptionsBuilder<CookieAuthenticationOptions>? TwoFactorUserIdCookie { get; set; }
IdentityCookiesBuilderExtensions.cs (8)
47public static OptionsBuilder<CookieAuthenticationOptions> AddApplicationCookie(this AuthenticationBuilder builder) 57return new OptionsBuilder<CookieAuthenticationOptions>(builder.Services, IdentityConstants.ApplicationScheme); 65public static OptionsBuilder<CookieAuthenticationOptions> AddExternalCookie(this AuthenticationBuilder builder) 72return new OptionsBuilder<CookieAuthenticationOptions>(builder.Services, IdentityConstants.ExternalScheme); 80public static OptionsBuilder<CookieAuthenticationOptions> AddTwoFactorRememberMeCookie(this AuthenticationBuilder builder) 90return new OptionsBuilder<CookieAuthenticationOptions>(builder.Services, IdentityConstants.TwoFactorRememberMeScheme); 98public static OptionsBuilder<CookieAuthenticationOptions> AddTwoFactorUserIdCookie(this AuthenticationBuilder builder) 109return new OptionsBuilder<CookieAuthenticationOptions>(builder.Services, IdentityConstants.TwoFactorUserIdScheme);
IdentityServiceCollectionExtensions.cs (4)
158/// <param name="configure">An action to configure the <see cref="CookieAuthenticationOptions"/>.</param> 160public static IServiceCollection ConfigureApplicationCookie(this IServiceCollection services, Action<CookieAuthenticationOptions> configure) 167/// <param name="configure">An action to configure the <see cref="CookieAuthenticationOptions"/>.</param> 169public static IServiceCollection ConfigureExternalCookie(this IServiceCollection services, Action<CookieAuthenticationOptions> configure)
Microsoft.AspNetCore.Identity.FunctionalTests (1)
Infrastructure\FunctionalTestsServiceCollectionExtensions.cs (1)
35services.Configure<CookieAuthenticationOptions>(schemeName, o => o.Events.OnSigningIn = context =>
Microsoft.AspNetCore.Identity.Test (1)
IdentityOptionsTest.cs (1)
84var options = serviceProvider.GetRequiredService<IOptionsMonitor<CookieAuthenticationOptions>>();
Microsoft.AspNetCore.Identity.UI (3)
IdentityDefaultUIConfigureOptions.cs (3)
15IConfigureNamedOptions<CookieAuthenticationOptions> where TUser : class 44public void Configure(CookieAuthenticationOptions options) 49public void Configure(string? name, CookieAuthenticationOptions options)