2019-12-07 16:40:42 +00:00
|
|
|
package handlers
|
|
|
|
|
2019-12-24 02:14:52 +00:00
|
|
|
import "github.com/authelia/authelia/internal/middlewares"
|
2019-12-07 16:40:42 +00:00
|
|
|
|
|
|
|
type ConfigurationBody struct {
|
|
|
|
GoogleAnalyticsTrackingID string `json:"ga_tracking_id,omitempty"`
|
2020-04-03 23:11:33 +00:00
|
|
|
RememberMeEnabled bool `json:"remember_me_enabled"` // whether remember me is enabled or not
|
2019-12-07 16:40:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func ConfigurationGet(ctx *middlewares.AutheliaCtx) {
|
|
|
|
body := ConfigurationBody{
|
|
|
|
GoogleAnalyticsTrackingID: ctx.Configuration.GoogleAnalyticsTrackingID,
|
2020-04-03 23:11:33 +00:00
|
|
|
RememberMeEnabled: ctx.Providers.SessionProvider.RememberMe != 0,
|
2019-12-07 16:40:42 +00:00
|
|
|
}
|
|
|
|
ctx.SetJSONBody(body)
|
|
|
|
}
|