2019-04-25 04:52:08 +07:00
|
|
|
package schema
|
|
|
|
|
|
|
|
// TOTPConfiguration represents the configuration related to TOTP options.
|
|
|
|
type TOTPConfiguration struct {
|
2021-08-03 16:55:21 +07:00
|
|
|
Issuer string `koanf:"issuer"`
|
|
|
|
Period int `koanf:"period"`
|
|
|
|
Skew *int `koanf:"skew"`
|
2019-04-25 04:52:08 +07:00
|
|
|
}
|
2020-04-05 19:37:21 +07:00
|
|
|
|
|
|
|
var defaultOtpSkew = 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{
|
|
|
|
Issuer: "Authelia",
|
|
|
|
Period: 30,
|
|
|
|
Skew: &defaultOtpSkew,
|
|
|
|
}
|