From 02c6f4aae7498121f59a67f62bb9e008b05ac050 Mon Sep 17 00:00:00 2001 From: James Tombleson Date: Wed, 3 Apr 2024 16:11:46 -0700 Subject: [PATCH] admin jwt now follows the same schema --- api/handlers/v1/jwt.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/api/handlers/v1/jwt.go b/api/handlers/v1/jwt.go index 58d1bef..88da586 100644 --- a/api/handlers/v1/jwt.go +++ b/api/handlers/v1/jwt.go @@ -84,7 +84,10 @@ func (h *Handler) generateAdminJwt(username string) (string, error) { claims["exp"] = time.Now().Add(10 * time.Minute) claims["authorized"] = true claims["username"] = username - claims["scopes"] = domain.ScopeAll + + var scopes []string + scopes = append(scopes, domain.ScopeAll) + claims["scopes"] = scopes tokenString, err := token.SignedString(secret) if err != nil {