factoriauth/src/auth.rs

22 lines
384 B
Rust
Raw Normal View History

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 {}
}
pub fn create_user_token(username: &str, password: &str) -> UserToken {
2024-02-10 10:51:56 +01:00
todo!()
}
}