From 54b475930080304a7d4c3390eabf6957f358a4e4 Mon Sep 17 00:00:00 2001 From: Juliusz Chroboczek Date: Fri, 25 Oct 2024 17:49:00 +0200 Subject: [PATCH] Omit token expiration if not provided. A token with empty expiration is useless anyway. --- token/stateful.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/token/stateful.go b/token/stateful.go index 70339d4..9c11d64 100644 --- a/token/stateful.go +++ b/token/stateful.go @@ -20,7 +20,7 @@ type Stateful struct { Group string `json:"group"` Username *string `json:"username,omitempty"` Permissions []string `json:"permissions"` - Expires *time.Time `json:"expires"` + Expires *time.Time `json:"expires,omitempty"` NotBefore *time.Time `json:"not-before,omitempty"` IssuedAt *time.Time `json:"issuedAt,omitempty"` IssuedBy *string `json:"issuedBy,omitempty"`