features/working-on-scopes #13
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user