Commit graph

22 commits

Author SHA1 Message Date
aecf9509f5 Implement padlock proxy 2024-02-20 21:57:03 +00:00
d1f8e461b1 db: rename methods to clarify token kind 2024-02-20 21:00:08 +00:00
360f3fcbbf Improve error handling 2024-02-15 20:14:07 +00:00
0e2d440489 Silence clippy 2024-02-15 18:34:43 +00:00
e913de5e8d update last_used on verify_user_token 2024-02-11 20:00:58 +01:00
5c747f2b41 slightly shorten db.get_token
(no good reason other than i think it looks better)
2024-02-11 19:04:53 +01:00
c887378476 use trait object for database 2024-02-11 16:48:03 +01:00
79bf7f764b small clean-ups
remove one level of Arc in state
2024-02-11 16:23:11 +01:00
271714dd37 Appease clippy 2024-02-10 21:48:09 +00:00
5772c26537 database: accept connection string as argument 2024-02-10 13:36:50 +00:00
dfa8cada5b use query! and query_as! 2024-02-10 14:31:22 +01:00
2bac280f3b make db only return tokens, not validate 2024-02-10 14:04:35 +01:00
d37c09d8d9 Add more instrument macros 2024-02-10 12:51:53 +00:00
51865c365c distinguish invalid token from database error 2024-02-10 13:39:10 +01:00
8c478ace92 fix db connection 2024-02-10 13:31:23 +01:00
be6e2cb6cd add last_used to user_tokens table 2024-02-10 13:18:08 +01:00
26bdc4c742 basic implementation of verify_user_token 2024-02-10 13:10:54 +01:00
2a1b6bd8ae generate token and save in database 2024-02-10 13:07:36 +01:00
399ed56b74 move secrets to secrets.rs 2024-02-10 12:32:01 +01:00
e4aa6c1909 impl From<String> for {Password,UserToken} 2024-02-10 12:30:04 +01:00
9cd4848ce8 Database::get_token 2024-02-10 12:25:46 +01:00
d4639c3152 beginnings of SqliteDatabase 2024-02-10 12:06:53 +01:00