From b404344a7c4ab5cb6c7d7b445fab796be79b848f Mon Sep 17 00:00:00 2001 From: Owen Jacobson Date: Tue, 3 Sep 2024 01:25:20 -0400 Subject: Allow login creation and authentication. This is a beefy change, as it adds a TON of smaller pieces needed to make this all function: * A database migration. * A ton of new crates for things like password validation, timekeeping, and HTML generation. * A first cut at a module structure for routes, templates, repositories. * A family of ID types, for identifying various kinds of domain thing. * AppError, which _doesn't_ implement Error but can be sent to clients. --- migrations/.gitignore | 0 migrations/20240831024047_login.sql | 22 ++++++++++++++++++++++ 2 files changed, 22 insertions(+) delete mode 100644 migrations/.gitignore create mode 100644 migrations/20240831024047_login.sql (limited to 'migrations') diff --git a/migrations/.gitignore b/migrations/.gitignore deleted file mode 100644 index e69de29..0000000 diff --git a/migrations/20240831024047_login.sql b/migrations/20240831024047_login.sql new file mode 100644 index 0000000..758e9c7 --- /dev/null +++ b/migrations/20240831024047_login.sql @@ -0,0 +1,22 @@ +create table login ( + id text + not null + primary key, + name text + not null + unique, + password_hash text + not null +); + +create table token ( + secret text + not null + primary key, + login text + not null, + issued_at text + not null, + foreign key (login) + references login (id) +); -- cgit v1.2.3