mirror of
https://github.com/0rangebananaspy/authelia.git
synced 2024-09-14 22:47:21 +07:00
3d20142292
Providing a GA tracking ID allows administrators to analyze how the portal is used by their users in large environments, i.e., with many users. This will make even more sense when we have users and admins management interfaces.
24 lines
727 B
Go
24 lines
727 B
Go
package handlers
|
|
|
|
import (
|
|
"github.com/clems4ever/authelia/internal/authentication"
|
|
"github.com/clems4ever/authelia/internal/middlewares"
|
|
)
|
|
|
|
type ExtendedConfigurationBody struct {
|
|
AvailableMethods MethodList `json:"available_methods"`
|
|
}
|
|
|
|
// ExtendedConfigurationGet get the extended configuration accessbile to authenticated users.
|
|
func ExtendedConfigurationGet(ctx *middlewares.AutheliaCtx) {
|
|
body := ExtendedConfigurationBody{}
|
|
body.AvailableMethods = MethodList{authentication.TOTP, authentication.U2F}
|
|
|
|
if ctx.Configuration.DuoAPI != nil {
|
|
body.AvailableMethods = append(body.AvailableMethods, authentication.Push)
|
|
}
|
|
|
|
ctx.Logger.Debugf("Available methods are %s", body.AvailableMethods)
|
|
ctx.SetJSONBody(body)
|
|
}
|