feat: custom background image config option

This commit is contained in:
Stavros
2025-05-14 19:47:56 +03:00
parent dbc460144e
commit 003f55b9ff
7 changed files with 19 additions and 3 deletions

View File

@@ -448,6 +448,7 @@ func (h *Handlers) AppHandler(c *gin.Context) {
GenericName: h.Config.GenericName,
Domain: h.Config.Domain,
ForgotPasswordMessage: h.Config.ForgotPasswordMessage,
BackgroundImage: h.Config.BackgroundImage,
}
// Return app context

View File

@@ -48,6 +48,7 @@ type AppContext struct {
GenericName string `json:"genericName"`
Domain string `json:"domain"`
ForgotPasswordMessage string `json:"forgotPasswordMessage"`
BackgroundImage string `json:"backgroundImage"`
}
// Totp request is the request for the totp endpoint

View File

@@ -33,6 +33,7 @@ type Config struct {
LoginTimeout int `mapstructure:"login-timeout"`
LoginMaxRetries int `mapstructure:"login-max-retries"`
FogotPasswordMessage string `mapstructure:"forgot-password-message" validate:"required"`
BackgroundImage string `mapstructure:"background-image" validate:"required"`
}
// Server configuration
@@ -44,6 +45,7 @@ type HandlersConfig struct {
GenericName string
Title string
ForgotPasswordMessage string
BackgroundImage string
}
// OAuthConfig is the configuration for the providers