LoginFailureTracker

Tracks authentication failures and lock status for a user.

Implementations may persist state in-memory or in external storage to support distributed deployments. / Returns whether tracking is effectively enabled (e.g. max failures > 0 and lock duration > 0). Returns remaining lock duration for a username, or {@code null} if not locked / disabled. Records a failed authentication attempt for the username. Clears tracking for a successful authentication of the username.

Inheritors

Functions

Link copied to clipboard
abstract fun getRemainingLock(username: String?): Duration?

获取剩余锁定时长

Link copied to clipboard
abstract fun isEnabled(): Boolean

判断是否启用状态

Link copied to clipboard
abstract fun onFailure(username: String?)

处理失败

Link copied to clipboard
abstract fun onSuccess(username: String?)

处理成功