authelia/internal/regulation/types.go
Amir Zarrinkafsh fabb76754e
Rename org from clems4ever to authelia
Also fix references from config.yml to configuration.yml
2019-12-24 13:14:52 +11:00

25 lines
670 B
Go

package regulation
import (
"time"
"github.com/authelia/authelia/internal/storage"
"github.com/authelia/authelia/internal/utils"
)
// Regulator an authentication regulator preventing attackers to brute force the service.
type Regulator struct {
// Is the regulation enabled.
enabled bool
// The number of failed authentication attempt before banning the user
maxRetries int
// If a user does the max number of retries within that duration, she will be banned.
findTime time.Duration
// If a user has been banned, this duration is the timelapse during which the user is banned.
banTime time.Duration
storageProvider storage.Provider
clock utils.Clock
}