From 24072cd0a131e69030a0be777e7658865ebfb270 Mon Sep 17 00:00:00 2001 From: liugq Date: Fri, 4 Aug 2023 18:19:54 +0800 Subject: [PATCH] set agent setup token expired in one hour --- modules/agent/api/setup.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/agent/api/setup.go b/modules/agent/api/setup.go index c63017c9..a318852d 100644 --- a/modules/agent/api/setup.go +++ b/modules/agent/api/setup.go @@ -28,7 +28,7 @@ type Token struct { UserID string } -const ExpiredIn = time.Millisecond * 1000 * 60 * 20 +const ExpiredIn = time.Millisecond * 1000 * 60 * 60 func (h *APIHandler) generateInstallCommand(w http.ResponseWriter, req *http.Request, ps httprouter.Params) { claims, ok := req.Context().Value("user").(*rbac.UserClaims) if !ok {