summaryrefslogtreecommitdiff
path: root/internal/handlers/handler_user_info.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/handlers/handler_user_info.go')
-rw-r--r--internal/handlers/handler_user_info.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/internal/handlers/handler_user_info.go b/internal/handlers/handler_user_info.go
index 49ce92264..64fb67107 100644
--- a/internal/handlers/handler_user_info.go
+++ b/internal/handlers/handler_user_info.go
@@ -57,6 +57,18 @@ func UserInfoPOST(ctx *middlewares.AutheliaCtx) {
}
}
+ if ctx.Configuration.TOTP.Disable {
+ userInfo.HasTOTP = false
+ }
+
+ if ctx.Configuration.WebAuthn.Disable {
+ userInfo.HasWebAuthn = false
+ }
+
+ if ctx.Configuration.DuoAPI.Disable {
+ userInfo.HasDuo = false
+ }
+
userInfo.DisplayName = userSession.DisplayName
err = ctx.SetJSONBody(userInfo)