authbox 0.1.4

A lightweight, modular authentication framework for Rust built around traits, async support, and pluggable component
Documentation
1
2
3
4
5
6
7
use super::auth_user::AuthUser;

pub trait UserStore<U: AuthUser> {
    fn find_by_id(&self, user_id: &str) -> Option<U>;
    fn find_by_email(&self, email: &str) -> Option<U>;
    fn create_user(&mut self, email: String, pass_hash: String) -> U;
}