mirror of
https://mau.dev/mautrix/go.git
synced 2026-03-14 14:25:53 +01:00
bridgev2/{commands,provisioning}: log full login step data
This commit is contained in:
parent
e1529f9616
commit
77f0658365
2 changed files with 7 additions and 2 deletions
|
|
@ -121,6 +121,7 @@ func fnLogin(ce *Event) {
|
|||
ce.Reply("Failed to start login: %v", err)
|
||||
return
|
||||
}
|
||||
ce.Log.Debug().Any("first_step", nextStep).Msg("Created login process")
|
||||
|
||||
nextStep = checkLoginCommandDirectParams(ce, login, nextStep)
|
||||
if nextStep != nil {
|
||||
|
|
@ -499,6 +500,7 @@ func maybeURLDecodeCookie(val string, field *bridgev2.LoginCookieField) string {
|
|||
}
|
||||
|
||||
func doLoginStep(ce *Event, login bridgev2.LoginProcess, step *bridgev2.LoginStep, override *bridgev2.UserLogin) {
|
||||
ce.Log.Debug().Any("next_step", step).Msg("Got next login step")
|
||||
if step.Instructions != "" {
|
||||
ce.Reply(step.Instructions)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -403,6 +403,9 @@ func (prov *ProvisioningAPI) PostLoginStart(w http.ResponseWriter, r *http.Reque
|
|||
Override: overrideLogin,
|
||||
}
|
||||
prov.loginsLock.Unlock()
|
||||
zerolog.Ctx(r.Context()).Info().
|
||||
Any("first_step", firstStep).
|
||||
Msg("Created login process")
|
||||
exhttp.WriteJSONResponse(w, http.StatusOK, &RespSubmitLogin{LoginID: loginID, LoginStep: firstStep})
|
||||
}
|
||||
|
||||
|
|
@ -511,7 +514,7 @@ func (prov *ProvisioningAPI) PostLoginSubmitInput(w http.ResponseWriter, r *http
|
|||
if nextStep.Type == bridgev2.LoginStepTypeComplete {
|
||||
prov.handleCompleteStep(r.Context(), login, nextStep)
|
||||
} else {
|
||||
zerolog.Ctx(r.Context()).Debug().Str("step_id", nextStep.StepID).Msg("Returning next login step")
|
||||
zerolog.Ctx(r.Context()).Debug().Any("next_step", nextStep).Msg("Returning next login step")
|
||||
}
|
||||
exhttp.WriteJSONResponse(w, http.StatusOK, &RespSubmitLogin{LoginID: login.ID, LoginStep: nextStep})
|
||||
}
|
||||
|
|
@ -532,7 +535,7 @@ func (prov *ProvisioningAPI) PostLoginWait(w http.ResponseWriter, r *http.Reques
|
|||
if nextStep.Type == bridgev2.LoginStepTypeComplete {
|
||||
prov.handleCompleteStep(r.Context(), login, nextStep)
|
||||
} else {
|
||||
zerolog.Ctx(r.Context()).Debug().Str("step_id", nextStep.StepID).Msg("Returning next login step")
|
||||
zerolog.Ctx(r.Context()).Debug().Any("next_step", nextStep).Msg("Returning next login step")
|
||||
}
|
||||
exhttp.WriteJSONResponse(w, http.StatusOK, &RespSubmitLogin{LoginID: login.ID, LoginStep: nextStep})
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue