26 writes to Cookie
Microsoft.AspNetCore.Antiforgery.Test (26)
DefaultAntiforgeryTest.cs (9)
29Cookie = new CookieBuilder 52Cookie = { SecurePolicy = CookieSecurePolicy.Always } 73Cookie = { SecurePolicy = CookieSecurePolicy.Always } 94Cookie = { SecurePolicy = CookieSecurePolicy.Always } 115Cookie = { SecurePolicy = CookieSecurePolicy.Always } 845Cookie = { Name = "cookie-name" }, 869Cookie = { Name = "cookie-name" }, 893Cookie = { Name = "cookie-name" }, 919Cookie = { Name = "cookie-name" },
DefaultAntiforgeryTokenStoreTest.cs (17)
21Cookie = { Name = _cookieName } 40Cookie = { Name = _cookieName } 61Cookie = { Name = _cookieName } 82Cookie = { Name = "cookie-name" }, 110Cookie = { Name = "cookie-name" }, 138Cookie = { Name = "cookie-name" }, 168Cookie = { Name = "cookie-name" }, 197Cookie = { Name = "cookie-name" }, 225Cookie = { Name = "cookie-name" }, 252Cookie = { Name = "cookie-name" }, 277Cookie = { Name = "cookie-name" }, 305Cookie = { Name = "cookie-name" }, 330Cookie = { Name = "cookie-name" }, 372Cookie = 416Cookie = { Name = _cookieName } 452Cookie = 491Cookie =
30 references to Cookie
Aspire.Dashboard (1)
DashboardWebApplication.cs (1)
271options.Cookie.Name = DashboardAntiForgeryCookieName;
Microsoft.AspNetCore.Antiforgery (12)
Internal\AntiforgeryOptionsSetup.cs (2)
25if (options.Cookie.Name == null) 28options.Cookie.Name = AntiforgeryOptions.DefaultCookiePrefix + ComputeCookieName(applicationId);
Internal\DefaultAntiforgery.cs (4)
107_logger.MissingCookieToken(_options.Cookie.Name); 153Resources.FormatAntiforgery_CookieToken_MustBeProvided(_options.Cookie.Name)); 258if (_options.Cookie.SecurePolicy == CookieSecurePolicy.Always && !context.Request.IsHttps) 261string.Join(".", nameof(AntiforgeryOptions), nameof(AntiforgeryOptions.Cookie), nameof(CookieBuilder.SecurePolicy)),
Internal\DefaultAntiforgeryTokenStore.cs (6)
26var requestCookie = httpContext.Request.Cookies[_options.Cookie.Name!]; 40var cookieToken = httpContext.Request.Cookies[_options.Cookie.Name!]; 84var options = _options.Cookie.Build(httpContext); 86if (_options.Cookie.Path != null) 88options.Path = _options.Cookie.Path; 99httpContext.Response.Cookies.Append(_options.Cookie.Name!, token, options);
Microsoft.AspNetCore.Antiforgery.Test (5)
AntiforgeryOptionsSetupTest.cs (5)
31var cookieName = options.Value.Cookie.Name; 44Assert.Null(o.Cookie.Name); 45o.Cookie.Name = "antiforgery"; 56var cookieName = options.Value.Cookie.Name; 69Assert.Equal(CookieSecurePolicy.None, options.Cookie.SecurePolicy);
Microsoft.AspNetCore.Mvc.FunctionalTests (5)
AntiforgeryMiddlewareTest.cs (4)
41request.Headers.Add("Cookie", antiforgeryOptions.Value.Cookie.Name + "=" + tokens.CookieToken); 125request.Headers.Add("Cookie", antiforgeryOptions.Value.Cookie.Name + "=" + tokens.CookieToken); 157request.Headers.Add("Cookie", antiforgeryOptions.Value.Cookie.Name + "=" + tokens.CookieToken); 189request.Headers.Add("Cookie", antiforgeryOptions.Value.Cookie.Name + "=" + tokens.CookieToken);
SimpleWithWebApplicationBuilderTests.cs (1)
269Client.DefaultRequestHeaders.Add("Cookie", new CookieHeaderValue(antiforgeryOptions.Value.Cookie.Name, tokens.CookieToken).ToString());
Microsoft.AspNetCore.Routing.FunctionalTests (7)
MinimalFormTests.cs (7)
54request.Headers.Add("Cookie", antiforgeryOptions.Value.Cookie.Name + "=" + tokens.CookieToken); 114request.Headers.Add("Cookie", antiforgeryOptions.Value.Cookie.Name + "=" + tokens.CookieToken); 475request.Headers.Add("Cookie", antiforgeryOptions.Value.Cookie.Name + "=" + tokens.CookieToken); 534request.Headers.Add("Cookie", antiforgeryOptions.Value.Cookie.Name + "=" + tokens.CookieToken); 586request.Headers.Add("Cookie", antiforgeryOptions.Value.Cookie.Name + "=" + tokens.CookieToken); 638request.Headers.Add("Cookie", antiforgeryOptions.Value.Cookie.Name + "=" + tokens.CookieToken); 687request.Headers.Add("Cookie", antiforgeryOptions.Value.Cookie.Name + "=" + tokens.CookieToken);