mellon 0.1.0

Library for adding contemporary authentication to rust-based websites.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//! Challenges that a user needs to pass to proceed to the next step

use serde::{Deserialize, Serialize};
use webauthn_rs::prelude::{PasskeyAuthentication, PasskeyRegistration};

// TODO these should be individual structs serialized with Ron and not json
/// Server-side challenges that need to be stored for a short time
#[derive(Debug, Serialize, Deserialize)]
pub enum Challenge {
    ConfirmPassword { phc: String },
    ConfirmTotp { seed_base32: String },
    WebauthnRegister(PasskeyRegistration),
    WebauthnLogin(PasskeyAuthentication),
}