2019-04-24 21:52:08 +00:00
|
|
|
package schema
|
|
|
|
|
|
|
|
// TOTPConfiguration represents the configuration related to TOTP options.
|
|
|
|
type TOTPConfiguration struct {
|
2022-03-03 11:20:43 +00:00
|
|
|
Disable bool `koanf:"disable"`
|
2021-12-01 12:11:29 +00:00
|
|
|
Issuer string `koanf:"issuer"`
|
|
|
|
Algorithm string `koanf:"algorithm"`
|
|
|
|
Digits uint `koanf:"digits"`
|
|
|
|
Period uint `koanf:"period"`
|
|
|
|
Skew *uint `koanf:"skew"`
|
2019-04-24 21:52:08 +00:00
|
|
|
}
|
2020-04-05 12:37:21 +00:00
|
|
|
|
2021-12-01 12:11:29 +00:00
|
|
|
var defaultOtpSkew = uint(1)
|
2020-04-20 21:03:38 +00:00
|
|
|
|
|
|
|
// DefaultTOTPConfiguration represents default configuration parameters for TOTP generation.
|
2020-04-05 12:37:21 +00:00
|
|
|
var DefaultTOTPConfiguration = TOTPConfiguration{
|
2021-12-01 12:11:29 +00:00
|
|
|
Issuer: "Authelia",
|
|
|
|
Algorithm: TOTPAlgorithmSHA1,
|
|
|
|
Digits: 6,
|
|
|
|
Period: 30,
|
|
|
|
Skew: &defaultOtpSkew,
|
2020-04-05 12:37:21 +00:00
|
|
|
}
|