Cookie.h 572 B

123456789101112131415161718192021222324252627282930313233
  1. /*
  2. * Copyright (c) 2021, Tim Flynn <trflynn89@pm.me>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #pragma once
  7. #include <AK/String.h>
  8. #include <LibCore/DateTime.h>
  9. namespace Web::Cookie {
  10. enum class Source {
  11. NonHttp,
  12. Http,
  13. };
  14. struct Cookie {
  15. String name;
  16. String value;
  17. Core::DateTime creation_time {};
  18. Core::DateTime last_access_time {};
  19. Core::DateTime expiry_time {};
  20. String domain {};
  21. String path {};
  22. bool secure { false };
  23. bool http_only { false };
  24. bool host_only { false };
  25. bool persistent { false };
  26. };
  27. }