|
@@ -300,11 +300,11 @@ func (s *JlService) ProjectExist(projectId int, accountId int) (map[string]inter
|
|
}
|
|
}
|
|
|
|
|
|
debug := GetEnvInfo("DEBUG")
|
|
debug := GetEnvInfo("DEBUG")
|
|
-
|
|
|
|
|
|
+ expirationTime := time.Now().Add(6 * time.Second)
|
|
tokenString, _ := utils.CreateJlToken(jwt.MapClaims{
|
|
tokenString, _ := utils.CreateJlToken(jwt.MapClaims{
|
|
- "code": projectData.Code,
|
|
|
|
- "account": accountData.Account,
|
|
|
|
- "exp": time.Now().Add(24 * time.Hour).Unix(),
|
|
|
|
|
|
+ "data": map[string]string{"code": projectData.Code, "account": accountData.Account},
|
|
|
|
+ "exp": expirationTime.Unix(),
|
|
|
|
+ "iat": time.Now().Unix(),
|
|
})
|
|
})
|
|
return map[string]interface{}{"env": debug, "token": tokenString}, nil
|
|
return map[string]interface{}{"env": debug, "token": tokenString}, nil
|
|
}
|
|
}
|