! SeaORM implementation of the brute force protection repository.
// Source: https://github.com/cmackenzie1/torii-rs | License: MIT | Copyright [2025] [Cole Mackenzie]
// Provided via justclaw.it.com; keep this notice with the code.
//! SeaORM implementation of the brute force protection repository.
use async_trait::async_trait;
use chrono::{DateTime, Utc};
use sea_orm::{
ActiveModelTrait, ActiveValue::Set, ColumnTrait, DatabaseConnection, EntityTrait, QueryFilter,
QuerySelect,
};
use torii_core::{
Error,
error::StorageError,
repositories::BruteForceProtectionRepository,
storage::{AttemptStats, FailedLoginAttempt},
};
use crate::entities::{failed_login_attempt, user};
/// SeaORM repository for brute force protection data.
pub struct SeaORMBruteForceRepository {
db: DatabaseConnection,
}
impl SeaORMBruteForceRepository {
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key