2025-11-09 12:47:56 +01:00
|
|
|
|
namespace ElectronNET.API.Entities
|
|
|
|
|
|
{
|
2020-05-22 16:38:34 +02:00
|
|
|
|
/// <summary>
|
2025-11-22 02:16:10 +01:00
|
|
|
|
/// Cookie structure as used by Electron session.cookies APIs.
|
2020-05-22 16:38:34 +02:00
|
|
|
|
/// </summary>
|
2025-11-22 02:16:10 +01:00
|
|
|
|
/// <remarks>Up-to-date with Electron API 39.2</remarks>
|
2025-11-09 12:47:56 +01:00
|
|
|
|
public class Cookie
|
|
|
|
|
|
{
|
2020-05-22 16:38:34 +02:00
|
|
|
|
/// <summary>
|
2025-11-22 02:16:10 +01:00
|
|
|
|
/// Gets or sets the name of the cookie.
|
2020-05-22 16:38:34 +02:00
|
|
|
|
/// </summary>
|
2025-11-09 12:47:56 +01:00
|
|
|
|
public string Name { get; set; }
|
2020-05-22 16:38:34 +02:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2025-11-22 02:16:10 +01:00
|
|
|
|
/// Gets or sets the value of the cookie.
|
2020-05-22 16:38:34 +02:00
|
|
|
|
/// </summary>
|
|
|
|
|
|
public string Value { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2025-11-22 02:16:10 +01:00
|
|
|
|
/// Gets or sets the domain of the cookie; this will be normalized with a preceding dot so that it's also valid for subdomains.
|
2020-05-22 16:38:34 +02:00
|
|
|
|
/// </summary>
|
|
|
|
|
|
public string Domain { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2025-11-22 02:16:10 +01:00
|
|
|
|
/// Gets or sets a value indicating whether the cookie is a host-only cookie; this will only be true if no domain was passed.
|
2020-05-22 16:38:34 +02:00
|
|
|
|
/// </summary>
|
2025-12-23 21:10:57 +01:00
|
|
|
|
public bool? HostOnly { get; set; }
|
2020-05-22 16:38:34 +02:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2025-11-22 02:16:10 +01:00
|
|
|
|
/// Gets or sets the path of the cookie.
|
2020-05-22 16:38:34 +02:00
|
|
|
|
/// </summary>
|
2025-11-09 12:47:56 +01:00
|
|
|
|
public string Path { get; set; }
|
2020-05-22 16:38:34 +02:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2025-11-22 02:16:10 +01:00
|
|
|
|
/// Gets or sets a value indicating whether the cookie is marked as secure.
|
2020-05-22 16:38:34 +02:00
|
|
|
|
/// </summary>
|
2025-12-23 21:10:57 +01:00
|
|
|
|
public bool? Secure { get; set; }
|
2020-05-22 16:38:34 +02:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2025-11-22 02:16:10 +01:00
|
|
|
|
/// Gets or sets a value indicating whether the cookie is marked as HTTP only.
|
2020-05-22 16:38:34 +02:00
|
|
|
|
/// </summary>
|
2025-12-23 21:10:57 +01:00
|
|
|
|
public bool? HttpOnly { get; set; }
|
2020-05-22 16:38:34 +02:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2025-11-22 02:16:10 +01:00
|
|
|
|
/// Gets or sets a value indicating whether the cookie is a session cookie or a persistent cookie with an expiration date.
|
2020-05-22 16:38:34 +02:00
|
|
|
|
/// </summary>
|
2025-12-23 21:10:57 +01:00
|
|
|
|
public bool? Session { get; set; }
|
2020-05-22 16:38:34 +02:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2025-11-22 02:16:10 +01:00
|
|
|
|
/// Gets or sets the expiration date of the cookie as the number of seconds since the UNIX epoch. Not provided for session cookies.
|
2020-05-22 16:38:34 +02:00
|
|
|
|
/// </summary>
|
2025-12-23 21:10:57 +01:00
|
|
|
|
public double? ExpirationDate { get; set; }
|
2025-11-22 02:16:10 +01:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Gets or sets the SameSite policy applied to this cookie. Can be "unspecified", "no_restriction", "lax" or "strict".
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public string SameSite { get; set; }
|
2020-05-22 16:38:34 +02:00
|
|
|
|
}
|
2025-11-09 12:47:56 +01:00
|
|
|
|
}
|