auth_service_dhz 0.1.9

A simple authentication service example with login and database connection.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
pub mod models;

use models::Credentials;

pub fn logout() {
    println!("Logging out...");
}

pub fn login(creds: &mut Credentials) {
    println!("Authenticating user: {}", creds.username);
    crate::database::get_user();
    creds.is_login = true;
    creds.username = String::from("Authenticated User denghuizhi");
}