|
|
@@ -20,6 +20,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
import java.time.Instant;
|
|
|
+import java.util.Calendar;
|
|
|
import java.util.Date;
|
|
|
|
|
|
@Slf4j
|
|
|
@@ -138,7 +139,7 @@ public class UserServiceImpl implements UserService {
|
|
|
ImpersonationToken token;
|
|
|
log.info(String.format("createToken, userId = %d",userId));
|
|
|
// 最长为一年之后
|
|
|
- token = gitlabApi.getUserApi().createImpersonationToken(userId.toString(), "AES-" + Tools.randomUUID(), new Date("2024-10-04"), scopes);
|
|
|
+ token = gitlabApi.getUserApi().createImpersonationToken(userId.toString(), "AES-" + Tools.randomUUID(), new Date(2024, Calendar.NOVEMBER,4), scopes);
|
|
|
return token.getToken();
|
|
|
}
|
|
|
|