makejwt ttl 수정

This commit is contained in:
2025-08-13 22:32:01 +09:00
parent 1f9eb75e41
commit c449bae5ef

View File

@ -141,7 +141,7 @@ func (c *Client) MakeJWT(subject string, role string, ttl time.Duration) string
return ""
}
now := time.Now().UTC().Add(ttl).Add(time.Hour).Unix()
now := time.Now().Add(ttl).Unix()
src := []byte(fmt.Sprintf(`{"exp":%d,"sub":"%s","roles":"%s"}`, now, subject, role))
payload := make([]byte, encoding.EncodedLen(len(src)))
encoding.Encode(payload, src)