mirror of
https://github.com/0rangebananaspy/authelia.git
synced 2024-09-14 22:47:21 +07:00
05406cfc7b
This adds method to validate the system clock is synchronized on startup. Configuration allows adjusting the server address, enabled state, desync limit, and if the error is fatal. Co-authored-by: James Elliott <james-d-elliott@users.noreply.github.com>
18 lines
602 B
Go
18 lines
602 B
Go
package schema
|
|
|
|
// NTPConfiguration represents the configuration related to ntp server.
|
|
type NTPConfiguration struct {
|
|
Address string `koanf:"address"`
|
|
Version int `koanf:"version"`
|
|
MaximumDesync string `koanf:"max_desync"`
|
|
DisableStartupCheck bool `koanf:"disable_startup_check"`
|
|
DisableFailure bool `koanf:"disable_failure"`
|
|
}
|
|
|
|
// DefaultNTPConfiguration represents default configuration parameters for the NTP server.
|
|
var DefaultNTPConfiguration = NTPConfiguration{
|
|
Address: "time.cloudflare.com:123",
|
|
Version: 4,
|
|
MaximumDesync: "3s",
|
|
}
|