1
0
Fork 0
forked from forgejo/forgejo

Revert "[GITEA] rework long-term authentication"

This reverts commit 8d2dab94a6.
This commit is contained in:
Earl Warren 2024-01-16 14:11:28 +00:00
parent fd098cf75b
commit d694579bdf
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00
17 changed files with 156 additions and 367 deletions

View file

@ -17,7 +17,6 @@ import (
"net/url"
"os"
"path/filepath"
"strconv"
"strings"
"sync/atomic"
"testing"
@ -300,12 +299,6 @@ func loginUser(t testing.TB, userName string) *TestSession {
func loginUserWithPassword(t testing.TB, userName, password string) *TestSession {
t.Helper()
return loginUserWithPasswordRemember(t, userName, password, false)
}
func loginUserWithPasswordRemember(t testing.TB, userName, password string, rememberMe bool) *TestSession {
t.Helper()
req := NewRequest(t, "GET", "/user/login")
resp := MakeRequest(t, req, http.StatusOK)
@ -314,7 +307,6 @@ func loginUserWithPasswordRemember(t testing.TB, userName, password string, reme
"_csrf": doc.GetCSRF(),
"user_name": userName,
"password": password,
"remember": strconv.FormatBool(rememberMe),
})
resp = MakeRequest(t, req, http.StatusSeeOther)