This repository has been archived on 2026-04-25. You can view files and clone it, but cannot push or open issues or pull requests.
RustyPass/src/main.rs

31 lines
772 B
Rust
Raw Normal View History

// Libraries
mod interface;
mod resource;
mod secure;
mod auth;
// Functions
// Entry-Point
fn main() {
2024-06-14 13:32:02 -05:00
// Variables
let auth_profile: auth::Auth;
// Checking if we need to register or log in
if auth::Auth::exists() {
// Asking user for login credentials
let (username, password) = interface::int_auth();
// Verify the user
auth_profile = auth::Auth::authenticate(username, password);
} else {
// Asking user for register credentials
let (username, password) = interface::int_reg();
2024-06-14 13:32:02 -05:00
// Creating the user
auth_profile = auth::Auth::create(username, password);
}
// DEBUG: Testing if the user is authenticated
println!("Authenticated Status: {}", auth_profile.verified);
}