deploy adjust

This commit is contained in:
mr
2025-06-16 09:11:21 +02:00
parent 3d42ce6820
commit d83208be52
6 changed files with 36 additions and 13 deletions

View File

@@ -70,6 +70,7 @@ func (o *OAuthController) Login() {
if conf.GetConfig().SourceMode == "ldap" {
ldap := auth_connectors.New()
found, err := ldap.Authenticate(o.Ctx.Request.Context(), res.Username, res.Password)
fmt.Println("login", clientID, found, err)
if err != nil || !found {
o.Data["json"] = err
o.Ctx.ResponseWriter.WriteHeader(401)
@@ -84,6 +85,7 @@ func (o *OAuthController) Login() {
Name: "csrf_token",
Value: o.XSRFToken(),
})
fmt.Println("login token", token, err)
if err != nil || token == nil {
o.Data["json"] = err
o.Ctx.ResponseWriter.WriteHeader(401)