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