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