diff options
Diffstat (limited to 'internal/configuration/validator/authentication.go')
| -rw-r--r-- | internal/configuration/validator/authentication.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/internal/configuration/validator/authentication.go b/internal/configuration/validator/authentication.go index b0aae8413..c6af94594 100644 --- a/internal/configuration/validator/authentication.go +++ b/internal/configuration/validator/authentication.go @@ -33,6 +33,15 @@ func ValidateAuthenticationBackend(config *schema.AuthenticationBackendConfigura validator.Push(fmt.Errorf(errFmtAuthBackendRefreshInterval, config.RefreshInterval, err)) } } + + if config.PasswordReset.CustomURL.String() != "" { + switch config.PasswordReset.CustomURL.Scheme { + case schemeHTTP, schemeHTTPS: + config.DisableResetPassword = false + default: + validator.Push(fmt.Errorf(errFmtAuthBackendPasswordResetCustomURLScheme, config.PasswordReset.CustomURL.String(), config.PasswordReset.CustomURL.Scheme)) + } + } } // validateFileAuthenticationBackend validates and updates the file authentication backend configuration. |
