1 write to CookieToken
Microsoft.AspNetCore.Antiforgery (1)
AntiforgeryTokenSet.cs (1)
27
CookieToken
= cookieToken;
27 references to CookieToken
Microsoft.AspNetCore.Antiforgery (4)
Internal\DefaultAntiforgery.cs (4)
105
if (tokens.
CookieToken
== null)
150
if (tokens.
CookieToken
== null)
184
Debug.Assert(!string.IsNullOrEmpty(antiforgeryTokenSet.
CookieToken
));
464
cookieToken = _tokenSerializer.Deserialize(antiforgeryTokenSet.
CookieToken
!);
Microsoft.AspNetCore.Antiforgery.Test (11)
DefaultAntiforgeryTest.cs (11)
146
Assert.Equal(context.TestTokenSet.NewCookieTokenString, tokenset.
CookieToken
);
183
Assert.Equal(context.TestTokenSet.NewCookieTokenString, tokenset.
CookieToken
);
203
Assert.Null(tokenset.
CookieToken
);
238
Assert.Null(tokenset.
CookieToken
);
273
Assert.Null(tokenSet.
CookieToken
);
306
Assert.Null(tokenSet.
CookieToken
);
337
Assert.Null(tokenSet.
CookieToken
);
464
Assert.Equal(context.TestTokenSet.NewCookieTokenString, tokenSet.
CookieToken
);
498
Assert.Equal(context.TestTokenSet.NewCookieTokenString, tokenSet.
CookieToken
);
550
Assert.Equal("serialized-cookie-token-from-context", tokenset.
CookieToken
);
594
Assert.Equal("serialized-cookie-token-from-context", tokenset.
CookieToken
);
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
);