Documentation
¶
Index ¶
Constants ¶
View Source
const ( // AuthType1FA is the string representing an auth log for first-factor authentication. AuthType1FA = "1FA" // AuthTypePasskey is the string representing an auth log for first-factor passkey authentication. AuthTypePasskey = "Passkey" // AuthTypeTOTP is the string representing an auth log for second-factor authentication via TOTP. AuthTypeTOTP = "TOTP" // AuthTypeWebAuthn is the string representing an auth log for second-factor authentication via FIDO2/CTAP2/WebAuthn. AuthTypeWebAuthn = "WebAuthn" // AuthTypeDuo is the string representing an auth log for second-factor authentication via DUO. AuthTypeDuo = "Duo" // AuthTypePassword is the string representing an auth log for second-factor authentication via a Password. AuthTypePassword = "Password" )
Variables ¶
View Source
var ErrUserIsBanned = fmt.Errorf("user is banned")
ErrUserIsBanned user is banned error message.
Functions ¶
func FormatExpiresLong ¶ added in v4.39.0
func FormatExpiresShort ¶ added in v4.39.0
Types ¶
type Ban ¶ added in v4.39.0
type Ban struct {
// contains filtered or unexported fields
}
func NewBan ¶ added in v4.39.0
NewBan constructs a friendly version of ban information for easy formatting.
func (*Ban) FormatExpires ¶ added in v4.39.0
type Context ¶ added in v4.36.0
type Context interface { context.Context MetricsRecorder GetLogger() *logrus.Entry RemoteIP() (ip net.IP) }
Context represents a regulator context.
type MetricsRecorder ¶ added in v4.36.0
MetricsRecorder represents the methods used to record regulation.
type Regulator ¶
type Regulator struct {
// contains filtered or unexported fields
}
Regulator an authentication regulator preventing attackers to brute force the service.
func NewRegulator ¶
func NewRegulator(config schema.Regulation, store storage.RegulatorProvider, clock clock.Provider) *Regulator
NewRegulator create a regulator instance.
Click to show internal directories.
Click to hide internal directories.