Pull in code from pool_elo

need to re-integrate yugioh code
This commit is contained in:
2024-09-03 01:52:20 -04:00
parent 921f2de61a
commit 4674289473
54 changed files with 1775 additions and 164 deletions

19
src/auth.rs Normal file
View File

@@ -0,0 +1,19 @@
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()
}
}