diff --git a/server/handlers.go b/server/handlers.go index 97a46d57a3e37d6fcb300f22157a137e7513db45..24d39999736e34c12380a4da7b93e99ab9ed20c1 100644 --- a/server/handlers.go +++ b/server/handlers.go @@ -259,16 +259,15 @@ func (s *Server) handleAuthorization(w http.ResponseWriter, r *http.Request) { } connectorInfos := make([]connectorInfo, len(connectors)) - i := 0 - for _, conn := range connectors { - connectorInfos[i] = connectorInfo{ + for index, conn := range connectors { + connectorInfos[index] = connectorInfo{ ID: conn.ID, Name: conn.Name, + Type: conn.Type, // TODO(ericchiang): Make this pass on r.URL.RawQuery and let something latter // on create the auth request. URL: s.absPath("/auth", conn.ID) + "?req=" + authReq.ID, } - i++ } if err := s.templates.login(r, w, connectorInfos, r.URL.Path); err != nil { diff --git a/server/templates.go b/server/templates.go index b9beab339fb6f1117dc915ce0e8055a5baa362f0..4947a102498cc048fe718d175e7604505209a451 100644 --- a/server/templates.go +++ b/server/templates.go @@ -233,6 +233,7 @@ type connectorInfo struct { ID string Name string URL string + Type string } type byName []connectorInfo diff --git a/web/static/main.css b/web/static/main.css index 552479adfa602ce890fd63a61d695716f6005f88..2e6ce338745445f79fd59f78493681c90ec54b92 100644 --- a/web/static/main.css +++ b/web/static/main.css @@ -68,12 +68,12 @@ body { background-size: contain; } -.dex-btn-icon--bitbucket { +.dex-btn-icon--bitbucket-cloud { background-color: #205081; background-image: url(../static/img/bitbucket-icon.svg); } -.dex-btn-icon--ldap, .dex-btn-icon--tectonic-ldap { +.dex-btn-icon--ldap { background-color: #84B6EF; background-image: url(../static/img/ldap-icon.svg); } diff --git a/web/templates/login.html b/web/templates/login.html index 56151a78ef677a4965a3de338181dec762d75fdc..f432dd00965f0418cfe0c57e53d3c3aef0b7cf13 100644 --- a/web/templates/login.html +++ b/web/templates/login.html @@ -7,7 +7,7 @@ <div class="theme-form-row"> <a href="{{ $c.URL }}" target="_self"> <button class="dex-btn theme-btn-provider"> - <span class="dex-btn-icon dex-btn-icon--{{ $c.ID }}"></span> + <span class="dex-btn-icon dex-btn-icon--{{ $c.Type }}"></span> <span class="dex-btn-text">Log in with {{ $c.Name }}</span> </button> </a>