diff --git a/clientapi/routing/login.go b/clientapi/routing/login.go index 25b003032..02d958152 100644 --- a/clientapi/routing/login.go +++ b/clientapi/routing/login.go @@ -47,9 +47,6 @@ type passwordRequest struct { // Thus a pointer is needed to differentiate between the two InitialDisplayName *string `json:"initial_device_display_name"` DeviceID *string `json:"device_id"` - Identifier struct { - User string `json:"user"` - } `json:"identifier"` } type loginResponse struct { @@ -82,15 +79,13 @@ func Login( if resErr != nil { return *resErr } - if r.User == "" && r.Identifier.User == "" { + if r.User == "" { return util.JSONResponse{ Code: http.StatusBadRequest, JSON: jsonerror.BadJSON("'user' must be supplied."), } } - if r.User == "" { - r.User = r.Identifier.User - } + util.GetLogger(req.Context()).WithField("user", r.User).Info("Processing login request") localpart, err := userutil.ParseUsernameParam(r.User, &cfg.Matrix.ServerName)