1 write to Options
Microsoft.AspNetCore.CookiePolicy (1)
ResponseCookiesWrapper.cs (1)
23
Options
= options;
27 references to Options
Microsoft.AspNetCore.CookiePolicy (27)
ResponseCookiesWrapper.cs (27)
41
_isConsentNeeded =
Options
.CheckConsentNeeded == null ? false
42
:
Options
.CheckConsentNeeded(Context);
56
var cookie = Context.Request.Cookies[
Options
.ConsentCookie.Name!];
57
_hasConsent = string.Equals(cookie,
Options
.ConsentCookieValue, StringComparison.Ordinal);
71
var cookieOptions =
Options
.ConsentCookie.Build(Context);
73
Append(
Options
.ConsentCookie.Name!,
Options
.ConsentCookieValue, cookieOptions);
83
var cookieOptions =
Options
.ConsentCookie.Build(Context);
85
Delete(
Options
.ConsentCookie.Name!, cookieOptions);
94
var key =
Options
.ConsentCookie.Name;
95
var value =
Options
.ConsentCookieValue;
96
var options =
Options
.ConsentCookie.Build(Context);
107
||
Options
.MinimumSameSitePolicy != SameSiteMode.Unspecified
108
||
Options
.HttpOnly != HttpOnlyPolicy.None
109
||
Options
.Secure != CookieSecurePolicy.None;
114
if (CheckPolicyRequired() ||
Options
.OnAppendCookie != null)
166
if (
Options
.OnAppendCookie != null)
174
Options
.OnAppendCookie(context);
186
if (CheckPolicyRequired() ||
Options
.OnDeleteCookie != null)
203
if (
Options
.OnDeleteCookie != null)
211
Options
.OnDeleteCookie(context);
229
switch (
Options
.Secure)
252
if (options.SameSite <
Options
.MinimumSameSitePolicy)
254
options.SameSite =
Options
.MinimumSameSitePolicy;
255
_logger.CookieSameSiteUpgraded(key,
Options
.MinimumSameSitePolicy.ToString());
258
switch (
Options
.HttpOnly)
270
throw new InvalidOperationException($"Unrecognized {nameof(HttpOnlyPolicy)} value {
Options
.HttpOnly.ToString()}");