Commit graph

21 commits

Author SHA1 Message Date
51865c365c distinguish invalid token from database error 2024-02-10 13:39:10 +01:00
e56c7525e2 Rename Authenticator to UserAuthenticator 2024-02-10 12:35:30 +00:00
ffd3a95076 Simplify user token generation 2024-02-10 12:33:05 +00:00
fbab2494eb Add ServerPadlockGenerator, UserServerKeyGenerator prototypes 2024-02-10 12:28:12 +00:00
ac7f03db15 Add AuthenticationError enum 2024-02-10 12:27:25 +00: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
62390aa0ad Return Result from Authenticator::verify_user_token() 2024-02-10 11:57:09 +00:00
97ed869230 Pass username to Authenticator::verify_user_token() 2024-02-10 11:57:09 +00:00
d195147f35 make Authenticator non-generic 2024-02-10 12:56:35 +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
3c5bff0237 trait bound 2024-02-10 12:11:36 +01:00
d4639c3152 beginnings of SqliteDatabase 2024-02-10 12:06:53 +01:00
2447786c81 Impl Deserialize for Password, UserToken 2024-02-10 10:45:55 +00:00
8ce85262be Remove nonsensical DebugSecret implementation 2024-02-10 10:45:55 +00:00
6bfda3f16b log {create,verify}_user_token 2024-02-10 11:20:35 +01:00
6a1be899f7 verify_user_token 2024-02-10 11:11:46 +01:00
6e70220222 use SecretString for password and user token 2024-02-10 11:10:58 +01:00
6ba03b79be authenticator skeleton 2024-02-10 11:01:02 +01:00