2024-02-10 11:10:58 +01:00
|
|
|
use secrecy::SecretString;
|
|
|
|
|
|
|
|
#[derive(Clone)]
|
|
|
|
pub struct Password(pub SecretString);
|
|
|
|
|
|
|
|
#[derive(Clone)]
|
|
|
|
pub struct UserToken(pub SecretString);
|
|
|
|
|
2024-02-10 10:51:56 +01:00
|
|
|
pub struct Authenticator {
|
|
|
|
// TODO
|
|
|
|
}
|
|
|
|
|
|
|
|
impl Authenticator {
|
|
|
|
pub fn new(/* database credentials ? */) -> Self {
|
|
|
|
Self {}
|
|
|
|
}
|
|
|
|
|
2024-02-10 11:10:58 +01:00
|
|
|
pub fn create_user_token(username: &str, password: &str) -> UserToken {
|
2024-02-10 10:51:56 +01:00
|
|
|
todo!()
|
|
|
|
}
|
|
|
|
}
|