summaryrefslogtreecommitdiff
path: root/internal/configuration/schema/configuration.go
diff options
context:
space:
mode:
authorJames Elliott <james-d-elliott@users.noreply.github.com>2020-04-30 12:03:05 +1000
committerGitHub <noreply@github.com>2020-04-30 12:03:05 +1000
commitc9e8a924e0782d6c2e6a8241e8cb7d0565084ebd (patch)
treea19d754844d0602b1a3bc7f73a0d7e33446d02a2 /internal/configuration/schema/configuration.go
parent2b627c6c04d5d10564fe79b35a99146aaad746ae (diff)
[FEATURE] Buffer size configuration and additional http error handling (#944)
* implement read buffer size config option * implement write buffer size config option * implement fasthttp ErrorHandler so we can log errors to Authelia as well * add struct/schema validation * add default value * add docs * add config key to validator * refactoring * apply suggestions from code review Co-authored-by: Amir Zarrinkafsh <nightah@me.com>
Diffstat (limited to 'internal/configuration/schema/configuration.go')
-rw-r--r--internal/configuration/schema/configuration.go31
1 files changed, 14 insertions, 17 deletions
diff --git a/internal/configuration/schema/configuration.go b/internal/configuration/schema/configuration.go
index f4178ca7e..da6fc047d 100644
--- a/internal/configuration/schema/configuration.go
+++ b/internal/configuration/schema/configuration.go
@@ -2,27 +2,24 @@ package schema
// Configuration object extracted from YAML configuration file.
type Configuration struct {
- Host string `mapstructure:"host"`
- Port int `mapstructure:"port"`
- TLSCert string `mapstructure:"tls_cert"`
- TLSKey string `mapstructure:"tls_key"`
-
- LogLevel string `mapstructure:"log_level"`
- LogFilePath string `mapstructure:"log_file_path"`
-
- // This secret is used by the identity validation process to forge JWT tokens
- // representing the permission to proceed with the operation.
+ Host string `mapstructure:"host"`
+ Port int `mapstructure:"port"`
+ TLSCert string `mapstructure:"tls_cert"`
+ TLSKey string `mapstructure:"tls_key"`
+ LogLevel string `mapstructure:"log_level"`
+ LogFilePath string `mapstructure:"log_file_path"`
JWTSecret string `mapstructure:"jwt_secret"`
DefaultRedirectionURL string `mapstructure:"default_redirection_url"`
GoogleAnalyticsTrackingID string `mapstructure:"google_analytics"`
+ // TODO: Consider refactoring the following pointers as they don't seem to need to be pointers: TOTP, Notifier, Regulation
AuthenticationBackend AuthenticationBackendConfiguration `mapstructure:"authentication_backend"`
Session SessionConfiguration `mapstructure:"session"`
-
- TOTP *TOTPConfiguration `mapstructure:"totp"`
- DuoAPI *DuoAPIConfiguration `mapstructure:"duo_api"`
- AccessControl AccessControlConfiguration `mapstructure:"access_control"`
- Regulation *RegulationConfiguration `mapstructure:"regulation"`
- Storage StorageConfiguration `mapstructure:"storage"`
- Notifier *NotifierConfiguration `mapstructure:"notifier"`
+ TOTP *TOTPConfiguration `mapstructure:"totp"`
+ DuoAPI *DuoAPIConfiguration `mapstructure:"duo_api"`
+ AccessControl AccessControlConfiguration `mapstructure:"access_control"`
+ Regulation *RegulationConfiguration `mapstructure:"regulation"`
+ Storage StorageConfiguration `mapstructure:"storage"`
+ Notifier *NotifierConfiguration `mapstructure:"notifier"`
+ Server ServerConfiguration `mapstructure:"server"`
}