Documentation
¶
Index ¶
- type BruteForceService
- func (s *BruteForceService) CheckLoginAttempt(email, ipAddress string) error
- func (s *BruteForceService) ClearAttempts(email string) error
- func (s *BruteForceService) GetLockoutInfo(email string) (*security.AccountLockout, error)
- func (s *BruteForceService) RecordFailedAttempt(email, ipAddress string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BruteForceService ¶
type BruteForceService struct {
// contains filtered or unexported fields
}
BruteForceService provides operations for brute force protection
func NewBruteForceService ¶
func NewBruteForceService(repo security.BruteForceRepository, config *security.BruteForceConfig) *BruteForceService
NewBruteForceService creates a new brute force service
func (*BruteForceService) CheckLoginAttempt ¶
func (s *BruteForceService) CheckLoginAttempt(email, ipAddress string) error
CheckLoginAttempt checks if a login can be attempted for the given email Returns an error if the account is locked
func (*BruteForceService) ClearAttempts ¶
func (s *BruteForceService) ClearAttempts(email string) error
ClearAttempts clears all failed attempts for an email and unlocks the account
func (*BruteForceService) GetLockoutInfo ¶
func (s *BruteForceService) GetLockoutInfo(email string) (*security.AccountLockout, error)
GetLockoutInfo gets lockout information for an account
func (*BruteForceService) RecordFailedAttempt ¶
func (s *BruteForceService) RecordFailedAttempt(email, ipAddress string) error
RecordFailedAttempt records a failed login attempt and locks the account if threshold is exceeded
Click to show internal directories.
Click to hide internal directories.