1 override of Cookies
Microsoft.AspNetCore.Http (1)
Internal\DefaultHttpResponse.cs (1)
112public override IResponseCookies Cookies
83 references to Cookies
BasicWebSite (2)
Controllers\TestingController.cs (2)
116Response.Cookies.Append( 138Response.Cookies.Append("Message", $"Value-{(value + 1).ToString(CultureInfo.InvariantCulture)}");
CookiePolicySample (4)
Startup.cs (4)
51context.Response.Cookies.Append("Temp", "1"); 54context.Response.Cookies.Delete("Temp"); 57context.Response.Cookies.Append("EssentialCookie", "2", 61context.Response.Cookies.Delete("EssentialCookie");
GenericHostWebSite (2)
Controllers\TestingController.cs (2)
102Response.Cookies.Append( 124Response.Cookies.Append("Message", $"Value-{(value + 1).ToString(CultureInfo.InvariantCulture)}");
HttpAbstractions.SampleApp (1)
Program.cs (1)
43response.Cookies.Append("Cookie1", "value1", new CookieOptions() { Expires = DateTimeOffset.UtcNow + TimeSpan.FromDays(1) });
Microsoft.AspNetCore.Antiforgery (1)
Internal\DefaultAntiforgeryTokenStore.cs (1)
99httpContext.Response.Cookies.Append(_options.Cookie.Name!, token, options);
Microsoft.AspNetCore.Antiforgery.Test (4)
DefaultAntiforgeryTokenStoreTest.cs (4)
364.Setup(o => o.Response.Cookies) 406.Setup(hc => hc.Response.Cookies) 442.Setup(hc => hc.Response.Cookies) 481.Setup(hc => hc.Response.Cookies)
Microsoft.AspNetCore.Authentication (2)
RemoteAuthenticationHandler.cs (2)
240Response.Cookies.Append(cookieName, CorrelationMarker, cookieOptions); 271Response.Cookies.Delete(cookieName, cookieOptions);
Microsoft.AspNetCore.Authentication.Cookies (3)
src\Shared\ChunkingCookieManager\ChunkingCookieManager.cs (3)
151var responseCookies = context.Response.Cookies; 294var responseCookies = context.Response.Cookies; 332context.Response.Cookies.Append(keyValuePairs.ToArray(), new CookieOptions(options)
Microsoft.AspNetCore.Authentication.OpenIdConnect (5)
OpenIdConnectHandler.cs (5)
1153/// Adds the nonce to <see cref="HttpResponse.Cookies"/>. 1156/// <remarks><see cref="M:IResponseCookies.Append"/> of <see cref="HttpResponse.Cookies"/> is called to add a cookie with the name: 'OpenIdConnectAuthenticationDefaults.Nonce + <see cref="M:ISecureDataFormat{TData}.Protect"/>(nonce)' of <see cref="OpenIdConnectOptions.StringDataFormat"/>. 1164Response.Cookies.Append( 1176/// <see cref="M:ISecureDataFormat{TData}.Unprotect"/> of <see cref="OpenIdConnectOptions.StringDataFormat"/> is used to obtain the actual 'nonce'. If the nonce is found, then <see cref="M:IResponseCookies.Delete"/> of <see cref="HttpResponse.Cookies"/> is called.</remarks> 1194Response.Cookies.Delete(nonceKey, cookieOptions);
Microsoft.AspNetCore.Authentication.Twitter (2)
TwitterHandler.cs (2)
103Response.Cookies.Delete(Options.StateCookie.Name!, cookieOptions); 177Response.Cookies.Append(Options.StateCookie.Name!, Options.StateDataFormat.Protect(requestToken), cookieOptions);
Microsoft.AspNetCore.CookiePolicy.Test (47)
CookieConsentTests.cs (18)
27context.Response.Cookies.Append("Test", "Value"); 46context.Response.Cookies.Append("Test", "Value"); 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 }); 163context.Response.Cookies.Append("Test", "Value"); 186context.Response.Cookies.Append("Test", "Value"); 213context.Response.Cookies.Append("Test", "Value"); 301context.Response.Cookies.Append("Test", "Value"); 331Assert.Throws<InvalidOperationException>(() => context.Response.Cookies.Append("Test", "Value")); 362context.Response.Cookies.Append("Test", "Value"); 386context.Response.Cookies.Append("Test", "Value1"); 394context.Response.Cookies.Append("Test", "Value2"); 471context.Response.Cookies.Append("Test", "Value1"); 482context.Response.Cookies.Append("Test", "Value2"); 506context.Response.Cookies.Delete("Test"); 540context.Response.Cookies.Delete("Test");
CookiePolicyTests.cs (26)
23context.Response.Cookies.Append("A", "A"); 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 }); 31context.Response.Cookies.Append("A", "A"); 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 }); 39context.Response.Cookies.Append("A", "A"); 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) }); 257context.Response.Cookies.Append("A", "A"); 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 }); 296context.Response.Cookies.Delete("A"); 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 }); 338Assert.Throws<NotImplementedException>(() => context.Response.Cookies.Delete("A")); 339Assert.Throws<NotImplementedException>(() => context.Response.Cookies.Delete("A", new CookieOptions())); 340Assert.Throws<NotImplementedException>(() => context.Response.Cookies.Append("A", "A")); 341Assert.Throws<NotImplementedException>(() => context.Response.Cookies.Append("A", "A", new CookieOptions()));
src\Shared\ChunkingCookieManager\ChunkingCookieManager.cs (3)
151var responseCookies = context.Response.Cookies; 294var responseCookies = context.Response.Cookies; 332context.Response.Cookies.Append(keyValuePairs.ToArray(), new CookieOptions(options)
Microsoft.AspNetCore.Mvc.Core (3)
src\Shared\ChunkingCookieManager\ChunkingCookieManager.cs (3)
151var responseCookies = context.Response.Cookies; 294var responseCookies = context.Response.Cookies; 332context.Response.Cookies.Append(keyValuePairs.ToArray(), new CookieOptions(options)
Microsoft.AspNetCore.OutputCaching.Tests (1)
OutputCacheMiddlewareTests.cs (1)
876c.Response.Cookies.Append("a", "b");
Microsoft.AspNetCore.Rewrite (1)
UrlActions\ChangeCookieAction.cs (1)
38context.HttpContext.Response.Cookies.Append(Name, Value ?? string.Empty, options);
Microsoft.AspNetCore.Session (1)
SessionMiddleware.cs (1)
144response.Cookies.Append(_options.Cookie.Name!, _cookieValue, cookieOptions);
Microsoft.AspNetCore.SignalR.Client.FunctionalTests (1)
Startup.cs (1)
88context.Response.Cookies.Append("fromNegotiate", "a value");
SignalR.Client.FunctionalTestApp (3)
Startup.cs (3)
193context.Response.Cookies.Append("testCookie", "testValue", cookieOptions); 194context.Response.Cookies.Append("testCookie2", "testValue2", cookieOptions); 197context.Response.Cookies.Append("expiredCookie", "doesntmatter", expiredCookieOptions);