mirror of
https://github.com/0rangebananaspy/authelia.git
synced 2024-09-14 22:47:21 +07:00
a4cf2e675f
* it doesn't work with our current CSP * it's probably not used by anyone * it isn't in harmony with our security purposes * literally removes all use of it * suggestions from code review * remove useless test. Co-authored-by: Amir Zarrinkafsh <nightah@me.com> Co-authored-by: Clement Michaud <clement.michaud34@gmail.com>
19 lines
718 B
Go
19 lines
718 B
Go
package handlers
|
|
|
|
import "github.com/authelia/authelia/internal/middlewares"
|
|
|
|
// ConfigurationBody configuration parameters exposed to the frontend.
|
|
type ConfigurationBody struct {
|
|
RememberMe bool `json:"remember_me"` // whether remember me is enabled or not
|
|
ResetPassword bool `json:"reset_password"`
|
|
}
|
|
|
|
// ConfigurationGet fetches configuration parameters for frontend mutation.
|
|
func ConfigurationGet(ctx *middlewares.AutheliaCtx) {
|
|
body := ConfigurationBody{
|
|
RememberMe: ctx.Providers.SessionProvider.RememberMe != 0,
|
|
ResetPassword: !ctx.Configuration.AuthenticationBackend.DisableResetPassword,
|
|
}
|
|
ctx.SetJSONBody(body) //nolint:errcheck // TODO: Legacy code, consider refactoring time permitting.
|
|
}
|