From 1a1da99c2bde90bfd0cb78ddca5276deed10bdc5 Mon Sep 17 00:00:00 2001 From: mo khan Date: Thu, 17 Apr 2025 14:43:01 -0600 Subject: refactor: introduce api to parse id token from multiple locations --- app/controllers/dashboard/controller.go | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'app') diff --git a/app/controllers/dashboard/controller.go b/app/controllers/dashboard/controller.go index 184a8ed..b0477ba 100644 --- a/app/controllers/dashboard/controller.go +++ b/app/controllers/dashboard/controller.go @@ -5,6 +5,7 @@ import ( "net/http" "github.com/xlgmokha/x/pkg/x" + "gitlab.com/gitlab-org/software-supply-chain-security/authorization/sparkled/pkg/domain" "gitlab.com/gitlab-org/software-supply-chain-security/authorization/sparkled/pkg/key" ) @@ -60,11 +61,13 @@ func (c *Controller) Show(w http.ResponseWriter, r *http.Request) { t := x.Must(template.New("show").Parse(tpl)) data := struct { - Title string - Sparkles []string + Title string + CurrentUser *domain.User + Sparkles []string }{ - Title: "SparkleLab", - Sparkles: []string{}, + Title: "SparkleLab", + CurrentUser: currentUser, + Sparkles: []string{}, } t.Execute(w, data) } -- cgit v1.2.3