2019-04-24 21:52:08 +00:00
|
|
|
package validator
|
|
|
|
|
|
|
|
import (
|
2019-12-24 02:14:52 +00:00
|
|
|
"github.com/authelia/authelia/internal/configuration/schema"
|
2019-04-24 21:52:08 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
const defaultTOTPIssuer = "Authelia"
|
|
|
|
|
|
|
|
// ValidateTOTP validates and update TOTP configuration.
|
|
|
|
func ValidateTOTP(configuration *schema.TOTPConfiguration, validator *schema.StructValidator) {
|
|
|
|
if configuration.Issuer == "" {
|
|
|
|
configuration.Issuer = defaultTOTPIssuer
|
|
|
|
}
|
|
|
|
}
|