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