mirror of
https://github.com/0rangebananaspy/authelia.git
synced 2024-09-14 22:47:21 +07:00
9800421b88
* [FEATURE] Disable Reset Password * add configuration key to authentication_backend called disable_reset_password * disable_reset_password prevents the API handler for the functionality and the UI element * disable_reset_password is a boolean * adjust RememberMeEnabled to be RememberMe instead as it's just unnecessary * add docs for security measures and in the authentication docs * updated config.template.yml * add flexEnd style to align reset password when remember me disabled * add todo items for ldap user/password validation relating to this
19 lines
687 B
Go
19 lines
687 B
Go
package handlers
|
|
|
|
import "github.com/authelia/authelia/internal/middlewares"
|
|
|
|
type ConfigurationBody struct {
|
|
GoogleAnalyticsTrackingID string `json:"ga_tracking_id,omitempty"`
|
|
RememberMe bool `json:"remember_me"` // whether remember me is enabled or not
|
|
ResetPassword bool `json:"reset_password"`
|
|
}
|
|
|
|
func ConfigurationGet(ctx *middlewares.AutheliaCtx) {
|
|
body := ConfigurationBody{
|
|
GoogleAnalyticsTrackingID: ctx.Configuration.GoogleAnalyticsTrackingID,
|
|
RememberMe: ctx.Providers.SessionProvider.RememberMe != 0,
|
|
ResetPassword: !ctx.Configuration.AuthenticationBackend.DisableResetPassword,
|
|
}
|
|
ctx.SetJSONBody(body)
|
|
}
|