StoredCookie Class
A cookie of a CookieJar (https://httpwg.org/http-extensions/draft-ietf-httpbis-rfc6265bis.html#name-storage-model).
public sealed class StoredCookieConstructors
| Name | Description |
|---|---|
| StoredCookie() | Creates a cookie (e.g. a cookie loaded by a CookiePersistence). |
StoredCookie()
CookieJar.cs- Obsolete: Constructors of types with required members are not supported in this version of your compiler.
Creates a cookie (e.g. a cookie loaded by a CookiePersistence).
[Obsolete("Constructors of types with required members are not supported in this version of your compiler.", true)]
public StoredCookie()Properties
| Name | Description |
|---|---|
| CreationTime | Gets the creation time of the cookie (the time of the cookie it replaced, if any). |
| Domain | Gets the domain of the cookie: the host of the URL that set it, or the domain of its Domain attribute (see StoredCookie.HostOnly). |
| Expires | Gets the expiry time of the cookie, or null for a session cookie (without Expires or Max-Age attribute). |
| HostOnly | Gets whether the cookie is only sent to the host of StoredCookie.Domain (it has no Domain attribute). |
| HttpOnly | Gets whether the cookie is hidden from the scripts (the HttpOnly attribute). |
| LastAccessTime | Gets the last time the cookie was sent (or created), which orders the eviction of the excess cookies. The jar updates the persisted access time at most once a minute. The default value is the creation time. |
| Name | Gets the name of the cookie (an isomorphic string: each character is a byte). |
| PartitionKey | Gets the partition key of a partitioned cookie (a cookie with the Partitioned attribute), or null. |
| Path | Gets the path of the cookie. |
| SameSite | Gets the same-site flag of the cookie, or null when it has no valid SameSite attribute (the cookie is then CookieSameSite.Lax by default). |
| Secure | Gets whether the cookie is only sent over secure connections (the Secure attribute). |
| Value | Gets the value of the cookie (an isomorphic string: each character is a byte). |
CreationTime
CookieJar.csGets the creation time of the cookie (the time of the cookie it replaced, if any).
public DateTimeOffset CreationTime { get; init; }Property value
Domain
CookieJar.csGets the domain of the cookie: the host of the URL that set it, or the domain of its Domain attribute (see StoredCookie.HostOnly).
public required string Domain { get; init; }Property value
Expires
CookieJar.csGets the expiry time of the cookie, or null for a session cookie (without Expires or Max-Age attribute).
public DateTimeOffset? Expires { get; init; }Property value
HostOnly
CookieJar.csGets whether the cookie is only sent to the host of StoredCookie.Domain (it has no Domain attribute).
public bool HostOnly { get; init; }Property value
HttpOnly
CookieJar.csLastAccessTime
CookieJar.csGets the last time the cookie was sent (or created), which orders the eviction of the excess cookies. The jar updates the persisted access time at most once a minute. The default value is the creation time.
public DateTimeOffset LastAccessTime { get; init; }Property value
Name
CookieJar.csPartitionKey
CookieJar.csGets the partition key of a partitioned cookie (a cookie with the Partitioned attribute), or null.
public CookiePartitionKey? PartitionKey { get; init; }Property value
Path
CookieJar.csSameSite
CookieJar.csGets the same-site flag of the cookie, or null when it has no valid SameSite attribute (the cookie is then CookieSameSite.Lax by default).
public CookieSameSite? SameSite { get; init; }