Куки сделал на 12 часов (дата истечения в самом токене есть)
This commit is contained in:
@ -219,7 +219,7 @@ public class MainController implements ServletContextAware {
|
||||
if (jwt_r == null || jwt_r.isEmpty()) {
|
||||
maxAge = Duration.ZERO; // Удаляем куки
|
||||
} else {
|
||||
maxAge = Duration.ofHours(12); // 12 часов
|
||||
maxAge = Duration.ofSeconds(refresh_time);
|
||||
}
|
||||
|
||||
// Создаем ResponseCookie с настройками
|
||||
@ -247,7 +247,7 @@ public class MainController implements ServletContextAware {
|
||||
if (jwt_a == null || jwt_a.isEmpty()) {
|
||||
maxAge = Duration.ZERO; // Удаляем куки
|
||||
} else {
|
||||
maxAge = Duration.ofSeconds(access_time); //В 2 раза больше
|
||||
maxAge = Duration.ofSeconds(refresh_time);
|
||||
}
|
||||
// Создаем ResponseCookie с настройками
|
||||
ResponseCookie cookie = ResponseCookie.from("jwt_a", jwt_a)
|
||||
|
||||
Reference in New Issue
Block a user