admin jwt now follows the same schema

This commit is contained in:
James Tombleson 2024-04-03 16:11:46 -07:00
parent f159582d34
commit 02c6f4aae7
1 changed files with 4 additions and 1 deletions

View File

@ -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 {