[MM-14081] Disable checkMFA Endpoint by default and add tests for MFA login (#10356)

Этот коммит содержится в:
Daniel Schalla
2019-03-01 18:56:11 +01:00
коммит произвёл GitHub
родитель 6a3fdbd489
Коммит dcf611b735
6 изменённых файлов: 85 добавлений и 2 удалений

Просмотреть файл

@@ -915,7 +915,15 @@ func updateUserAuth(c *Context, w http.ResponseWriter, r *http.Request) {
w.Write([]byte(user.ToJson()))
}
// Deprecated: checkUserMfa is deprecated and should not be used anymore, starting with version 6.0 it will be disabled.
// Clients should attempt a login without MFA and will receive a MFA error when it's required.
func checkUserMfa(c *Context, w http.ResponseWriter, r *http.Request) {
if *c.App.Config().ServiceSettings.DisableLegacyMFA {
http.NotFound(w, r)
return
}
props := model.MapFromJson(r.Body)
loginId := props["login_id"]