diff options
| author | James Elliott <james-d-elliott@users.noreply.github.com> | 2023-10-02 13:50:36 +1100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-10-02 13:50:36 +1100 |
| commit | 465d30f415a92e3708914ca14e24e6021935f633 (patch) | |
| tree | f55af9fee0542ebc8da29683497d0f3c3eec2514 /internal/configuration/schema/configuration.go | |
| parent | f24dd6ad17b932687ba34b458d66babc81713b8b (diff) | |
refactor: adjust default redirect url behaviour (#6060)
This ensures people using the new cookie configurations also use the new default url configurations, as well as ensuring we do not fallback to the global default url and instead use it specifically to seed the default values for the compatibility mode.
Diffstat (limited to 'internal/configuration/schema/configuration.go')
| -rw-r--r-- | internal/configuration/schema/configuration.go | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/internal/configuration/schema/configuration.go b/internal/configuration/schema/configuration.go index 3fdd09f79..fda058e6b 100644 --- a/internal/configuration/schema/configuration.go +++ b/internal/configuration/schema/configuration.go @@ -1,16 +1,13 @@ package schema -import ( - "net/url" -) +import "net/url" // Configuration object extracted from YAML configuration file. type Configuration struct { - Theme string `koanf:"theme" json:"theme" jsonschema:"default=light,enum=auto,enum=light,enum=dark,enum=grey,title=Theme Name" jsonschema_description:"The name of the theme to apply to the web UI"` - CertificatesDirectory string `koanf:"certificates_directory" json:"certificates_directory" jsonschema:"title=Certificates Directory Path" jsonschema_description:"The path to a directory which is used to determine the certificates that are trusted"` - JWTSecret string `koanf:"jwt_secret" json:"jwt_secret" jsonschema:"title=Secret Key for JWT's" jsonschema_description:"Used for signing HS256 JWT's for identity verification"` - DefaultRedirectionURL *url.URL `koanf:"default_redirection_url" json:"default_redirection_url" jsonschema:"format=uri,title=The default redirection URL" jsonschema_description:"Used to redirect users when they visit the portal directly"` - Default2FAMethod string `koanf:"default_2fa_method" json:"default_2fa_method" jsonschema:"enum=totp,enum=webauthn,enum=mobile_push,title=Default 2FA method" jsonschema_description:"When a user logs in for the first time this is the 2FA method configured for them"` + Theme string `koanf:"theme" json:"theme" jsonschema:"default=light,enum=auto,enum=light,enum=dark,enum=grey,title=Theme Name" jsonschema_description:"The name of the theme to apply to the web UI"` + CertificatesDirectory string `koanf:"certificates_directory" json:"certificates_directory" jsonschema:"title=Certificates Directory Path" jsonschema_description:"The path to a directory which is used to determine the certificates that are trusted"` + JWTSecret string `koanf:"jwt_secret" json:"jwt_secret" jsonschema:"title=Secret Key for JWT's" jsonschema_description:"Used for signing HS256 JWT's for identity verification"` + Default2FAMethod string `koanf:"default_2fa_method" json:"default_2fa_method" jsonschema:"enum=totp,enum=webauthn,enum=mobile_push,title=Default 2FA method" jsonschema_description:"When a user logs in for the first time this is the 2FA method configured for them"` Log Log `koanf:"log" json:"log" jsonschema:"title=Log" jsonschema_description:"Logging Configuration"` IdentityProviders IdentityProviders `koanf:"identity_providers" json:"identity_providers" jsonschema:"title=Identity Providers" jsonschema_description:"Identity Providers Configuration"` @@ -28,4 +25,7 @@ type Configuration struct { WebAuthn WebAuthn `koanf:"webauthn" json:"webauthn" jsonschema:"title=WebAuthn" jsonschema_description:"WebAuthn Configuration"` PasswordPolicy PasswordPolicy `koanf:"password_policy" json:"password_policy" jsonschema:"title=Password Policy" jsonschema_description:"Password Policy Configuration"` PrivacyPolicy PrivacyPolicy `koanf:"privacy_policy" json:"privacy_policy" jsonschema:"title=Privacy Policy" jsonschema_description:"Privacy Policy Configuration"` + + // Deprecated: Use the cookies options instead. + DefaultRedirectionURL *url.URL `koanf:"default_redirection_url" json:"default_redirection_url" jsonschema:"deprecated,format=uri,title=The default redirection URL" jsonschema_description:"Used to redirect users when they visit the portal directly, this option has been deprecated in favor of the session multi-cookie domain configuration"` } |
