Files
yugioh-inventory/src/auth.rs
Matthew Kaminski 4674289473 Pull in code from pool_elo
need to re-integrate yugioh code
2024-09-03 01:52:20 -04:00

20 lines
449 B
Rust

use crate::user;
use axum_login::{AuthUser, AuthnBackend, UserId};
use serde::{Deserialize, Serialize};
// References
// https://github.com/maxcountryman/axum-login/tree/main/examples/sqlite/src
// https://framesurge.sh/perseus/en-US/docs/0.4.x/state/intro
impl AuthUser for user::Model {
type Id = i32;
fn id(&self) -> Self::Id {
self.id
}
fn session_auth_hash(&self) -> &[u8] {
self.password.as_bytes()
}
}