55 references to CookieOptions
CookiePolicySample (1)
Startup.cs (1)
58new CookieOptions() { IsEssential = true });
HttpAbstractions.SampleApp (1)
Program.cs (1)
43response.Cookies.Append("Cookie1", "value1", new CookieOptions() { Expires = DateTimeOffset.UtcNow + TimeSpan.FromDays(1) });
Microsoft.AspNetCore.CookiePolicy (2)
ResponseCookiesWrapper.cs (2)
116Append(key, value, new CookieOptions()); 188Delete(key, new CookieOptions());
Microsoft.AspNetCore.CookiePolicy.Test (33)
CookieChunkingTests.cs (10)
17new ChunkingCookieManager() { ChunkSize = null }.AppendResponseCookie(context, "TestCookie", testString, new CookieOptions()); 28var options = new CookieOptions 52new ChunkingCookieManager() { ChunkSize = 44 }.AppendResponseCookie(context, "TestCookie", testString, new CookieOptions()); 71new CookieOptions() { Extensions = { "simple", "key=value" } }); 99new ChunkingCookieManager() { ChunkSize = 31 }.AppendResponseCookie(context, "TestCookie", "ShortValue", new CookieOptions()); 130new ChunkingCookieManager() { ChunkSize = 31 }.AppendResponseCookie(context, "TestCookie", "abcdefghijklmnopqr", new CookieOptions()); 213new ChunkingCookieManager().DeleteCookie(context, "TestCookie", new CookieOptions() { Domain = "foo.com", Secure = true, Extensions = { "extension" } }); 235new ChunkingCookieManager().DeleteCookie(context, "TestCookie", new CookieOptions() { Domain = "foo.com", Secure = true }); 253new ChunkingCookieManager().DeleteCookie(context, "TestCookie", new CookieOptions() { Domain = "foo.com", Secure = true }); 282var cookieOptions = new CookieOptions()
CookieConsentTests.cs (4)
65context.Response.Cookies.Append("Test", "Value", new CookieOptions() { IsEssential = false }); 91context.Response.Cookies.Append("Test", "Value", new CookieOptions() { IsEssential = false }); 110context.Response.Cookies.Append("Test", "Value", new CookieOptions() { IsEssential = true }); 140context.Response.Cookies.Append("Test", "Value", new CookieOptions() { IsEssential = true });
CookiePolicyTests.cs (19)
24context.Response.Cookies.Append("B", "B", new CookieOptions { Secure = false }); 25context.Response.Cookies.Append("C", "C", new CookieOptions()); 26context.Response.Cookies.Append("D", "D", new CookieOptions { Secure = true }); 32context.Response.Cookies.Append("B", "B", new CookieOptions { HttpOnly = false }); 33context.Response.Cookies.Append("C", "C", new CookieOptions()); 34context.Response.Cookies.Append("D", "D", new CookieOptions { HttpOnly = true }); 40context.Response.Cookies.Append("B", "B", new CookieOptions()); 41context.Response.Cookies.Append("C", "C", new CookieOptions { SameSite = Http.SameSiteMode.None }); 42context.Response.Cookies.Append("D", "D", new CookieOptions { SameSite = Http.SameSiteMode.Lax }); 43context.Response.Cookies.Append("E", "E", new CookieOptions { SameSite = Http.SameSiteMode.Strict }); 44context.Response.Cookies.Append("F", "F", new CookieOptions { SameSite = (Http.SameSiteMode)(-1) }); 258context.Response.Cookies.Append("B", "B", new CookieOptions { Secure = false }); 259context.Response.Cookies.Append("C", "C", new CookieOptions() { SameSite = Http.SameSiteMode.Strict }); 260context.Response.Cookies.Append("D", "D", new CookieOptions { Secure = true }); 297context.Response.Cookies.Delete("B", new CookieOptions { Secure = false }); 298context.Response.Cookies.Delete("C", new CookieOptions()); 299context.Response.Cookies.Delete("D", new CookieOptions { Secure = true }); 339Assert.Throws<NotImplementedException>(() => context.Response.Cookies.Delete("A", new CookieOptions())); 341Assert.Throws<NotImplementedException>(() => context.Response.Cookies.Append("A", "A", new CookieOptions()));
Microsoft.AspNetCore.Http (1)
Internal\ResponseCookies.cs (1)
108Delete(key, new CookieOptions() { Path = "/" });
Microsoft.AspNetCore.Http.Abstractions (1)
CookieBuilder.cs (1)
109var options = new CookieOptions
Microsoft.AspNetCore.Http.Abstractions.Tests (1)
CookieBuilderTests.cs (1)
51Assert.Equal(new CookieOptions().Path, new CookieBuilder().Build(new DefaultHttpContext()).Path);
Microsoft.AspNetCore.Http.Tests (9)
CookieOptionsTests.cs (1)
18var original = new CookieOptions()
ResponseCookiesTest.cs (8)
41cookies.Append(testCookie, "value", new CookieOptions() 65cookies.Append(testCookie, "value", new CookieOptions() 86cookies.Delete(testCookie, new CookieOptions() 134responseCookies.Delete(cookie.Key, new CookieOptions() { Domain = cookie.Domain, Path = cookie.Path }); 164responseCookies.Append(cookie.Key, cookie.Key, new CookieOptions() { Domain = cookie.Domain, Path = cookie.Path }); 165responseCookies.Delete(cookie.Key, new CookieOptions() { Domain = cookie.Domain, Path = cookie.Path }); 183var options = new CookieOptions 231var cookieOptions = new CookieOptions();
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (1)
CookieTempDataProviderTest.cs (1)
365Append(key, value, new CookieOptions());
Microsoft.AspNetCore.Rewrite (2)
UrlActions\ChangeCookieAction.cs (2)
46return new CookieOptions() 58_cachedOptions = new CookieOptions()
Microsoft.AspNetCore.Security.Microbenchmarks (1)
ChunkingCookieManagerBenchmark.cs (1)
29_cookieOptions = new CookieOptions()
SignalR.Client.FunctionalTestApp (2)
Startup.cs (2)
181var cookieOptions = new CookieOptions(); 182var expiredCookieOptions = new CookieOptions() { Expires = DateTimeOffset.Now.AddHours(-1) };