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