diff --git a/login/handler_test.go b/login/handler_test.go index a238a87..39881d9 100644 --- a/login/handler_test.go +++ b/login/handler_test.go @@ -29,10 +29,10 @@ func TestHandler_NewFromConfig(t *testing.T) { { &Config{ Backends: Options{ - "simple": map[string]string{"bob": "secret"}, + "simple": {"bob": "secret"}, }, Oauth: Options{ - "github": map[string]string{"client_id": "xxx", "client_secret": "YYY"}, + "github": {"client_id": "xxx", "client_secret": "YYY"}, }, }, 1, @@ -40,7 +40,7 @@ func TestHandler_NewFromConfig(t *testing.T) { false, }, { - &Config{Backends: Options{"simple": map[string]string{"bob": "secret"}}}, + &Config{Backends: Options{"simple": {"bob": "secret"}}}, 1, 0, false, @@ -48,7 +48,7 @@ func TestHandler_NewFromConfig(t *testing.T) { // error cases { // init error because no users are provided - &Config{Backends: Options{"simple": map[string]string{}}}, + &Config{Backends: Options{"simple": {}}}, 1, 0, true, @@ -56,7 +56,7 @@ func TestHandler_NewFromConfig(t *testing.T) { { &Config{ Oauth: Options{ - "FOOO": map[string]string{"client_id": "xxx", "client_secret": "YYY"}, + "FOOO": {"client_id": "xxx", "client_secret": "YYY"}, }, }, 0, @@ -70,7 +70,7 @@ func TestHandler_NewFromConfig(t *testing.T) { true, }, { - &Config{Backends: Options{"simpleFoo": map[string]string{"bob": "secret"}}}, + &Config{Backends: Options{"simpleFoo": {"bob": "secret"}}}, 1, 0, true, diff --git a/login/login_form.go b/login/login_form.go index b0c9849..5b1ce98 100644 --- a/login/login_form.go +++ b/login/login_form.go @@ -9,9 +9,9 @@ import ( "strings" ) -const loginForm = ` - -
+const partials = ` + +{{define "styles"}} @@ -47,29 +47,20 @@ const loginForm = ` border-radius: 3px; } - - -