2021-04-13 17:01:20 -04:00
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2021, Tim Flynn <trflynn89@pm.me>
|
|
|
|
|
*
|
2021-04-22 01:24:48 -07:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2021-04-13 17:01:20 -04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <AK/String.h>
|
|
|
|
|
#include <LibCore/DateTime.h>
|
|
|
|
|
|
|
|
|
|
namespace Web::Cookie {
|
|
|
|
|
|
2021-04-13 17:30:41 -04:00
|
|
|
enum class Source {
|
|
|
|
|
NonHttp,
|
|
|
|
|
Http,
|
|
|
|
|
};
|
|
|
|
|
|
2021-04-13 17:01:20 -04:00
|
|
|
struct Cookie {
|
|
|
|
|
String name;
|
|
|
|
|
String value;
|
|
|
|
|
Core::DateTime creation_time {};
|
|
|
|
|
Core::DateTime last_access_time {};
|
|
|
|
|
Core::DateTime expiry_time {};
|
|
|
|
|
String domain {};
|
|
|
|
|
String path {};
|
|
|
|
|
bool secure { false };
|
|
|
|
|
bool http_only { false };
|
|
|
|
|
bool host_only { false };
|
|
|
|
|
bool persistent { false };
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
}
|