limit the maximum count of password / token check failures per IP/user per minute (#33)

This commit is contained in:
MaysWind
2025-03-09 23:38:53 +08:00
parent a29ff0d553
commit 74844b9a99
23 changed files with 288 additions and 12 deletions
@@ -8,4 +8,6 @@ type DuplicateChecker interface {
SetSubmissionRemark(checkerType DuplicateCheckerType, uid int64, identification string, remark string)
GetOrSetCronJobRunningInfo(jobName string, runningInfo string, runningInterval time.Duration) (bool, string)
RemoveCronJobRunningInfo(jobName string)
GetFailureCount(failureKey string) uint32
IncreaseFailureCount(failureKey string) uint32
}