Refactor the login handler
Compare changes
Files
2- ale authored
+ 55
− 24
@@ -7,6 +7,7 @@ import (
@@ -68,12 +69,23 @@ func startTestHTTPServerWithKeyStore(t testing.TB) (string, *httptest.Server) {
@@ -83,7 +95,7 @@ func newTestHTTPClient() *http.Client {
@@ -91,6 +103,10 @@ func newTestHTTPClient() *http.Client {
@@ -106,10 +122,10 @@ func TestHTTP_ServeStaticAsset(t *testing.T) {
@@ -117,10 +133,10 @@ func doGet(t testing.TB, srv *httptest.Server, c *http.Client, relativeURL strin
@@ -173,6 +189,21 @@ func checkLoginOTPPage(t testing.TB, resp *http.Response) {
@@ -186,14 +217,14 @@ func TestHTTP_Login(t *testing.T) {
@@ -209,20 +240,20 @@ func TestHTTP_LoginOnSecondAttempt(t *testing.T) {
@@ -238,24 +269,24 @@ func TestHTTP_LoginAndLogout(t *testing.T) {
@@ -271,19 +302,19 @@ func TestHTTP_LoginOTP(t *testing.T) {
@@ -322,14 +353,14 @@ func TestHTTP_LoginWithKeyStore(t *testing.T) {
@@ -346,14 +377,14 @@ func TestHTTP_CORS(t *testing.T) {