Skip to content
Snippets Groups Projects
Commit 7c1d2d27 authored by ale's avatar ale
Browse files

Drop LoginMethod enum

Let clients decide what to put in that field.
parent c77ed85a
No related branches found
No related tags found
No related merge requests found
......@@ -25,12 +25,6 @@ const (
LogTypeOTPDisabled = "otp_disabled"
)
const (
LoginMethodPassword = "password"
LoginMethodOTP = "otp"
LoginMethodU2F = "u2f"
)
// DeviceInfo holds information about the client device. We use a
// simple persistent cookie to track the same client device across
// multiple session.
......
......@@ -73,7 +73,7 @@ func generateTestLogs(n int, userDevices map[string][]*usermetadb.DeviceInfo) []
Username: u,
Service: choose(randomServices),
Type: usermetadb.LogTypeLogin,
LoginMethod: usermetadb.LoginMethodPassword,
LoginMethod: "password",
Message: "logged in",
Timestamp: randomTime().UTC(),
DeviceInfo: dev,
......@@ -190,7 +190,7 @@ func TestUserlog_AddLog_NoDeviceInfo(t *testing.T) {
Username: u,
Service: choose(randomServices),
Type: usermetadb.LogTypeLogin,
LoginMethod: usermetadb.LoginMethodPassword,
LoginMethod: "password",
Message: "logged in",
Timestamp: time.Now().UTC(),
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment