mirror of
https://github.com/0rangebananaspy/authelia.git
synced 2024-09-14 22:47:21 +07:00
9b6bcca1ba
Allow customizing the shared secrets size specifically for apps which don't support 256bit shared secrets.
25 lines
716 B
Go
25 lines
716 B
Go
package schema
|
|
|
|
// TOTPConfiguration represents the configuration related to TOTP options.
|
|
type TOTPConfiguration struct {
|
|
Disable bool `koanf:"disable"`
|
|
Issuer string `koanf:"issuer"`
|
|
Algorithm string `koanf:"algorithm"`
|
|
Digits uint `koanf:"digits"`
|
|
Period uint `koanf:"period"`
|
|
Skew *uint `koanf:"skew"`
|
|
SecretSize uint `koanf:"secret_size"`
|
|
}
|
|
|
|
var defaultOtpSkew = uint(1)
|
|
|
|
// DefaultTOTPConfiguration represents default configuration parameters for TOTP generation.
|
|
var DefaultTOTPConfiguration = TOTPConfiguration{
|
|
Issuer: "Authelia",
|
|
Algorithm: TOTPAlgorithmSHA1,
|
|
Digits: 6,
|
|
Period: 30,
|
|
Skew: &defaultOtpSkew,
|
|
SecretSize: TOTPSecretSizeDefault,
|
|
}
|