2019-04-24 21:52:08 +00:00
|
|
|
package schema
|
|
|
|
|
|
|
|
// TOTPConfiguration represents the configuration related to TOTP options.
|
|
|
|
type TOTPConfiguration struct {
|
2020-01-21 20:56:44 +00:00
|
|
|
Issuer string `mapstructure:"issuer"`
|
2020-03-25 01:48:20 +00:00
|
|
|
Period int `mapstructure:"period"`
|
|
|
|
Skew *int `mapstructure:"skew"`
|
2019-04-24 21:52:08 +00:00
|
|
|
}
|
2020-04-05 12:37:21 +00:00
|
|
|
|
|
|
|
var defaultOtpSkew = 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{
|
|
|
|
Issuer: "Authelia",
|
|
|
|
Period: 30,
|
|
|
|
Skew: &defaultOtpSkew,
|
|
|
|
}
|