Quellcode durchsuchen

session销毁

tags/24080901
WendyYang vor 1 Jahr
Ursprung
Commit
b9cb8ac5f3
2 geänderte Dateien mit 2 neuen und 1 gelöschten Zeilen
  1. +1
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/user/controller/UserAuthController.java
  2. +1
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/user/security/auth/constants/SessionTimeConstant.java

+ 1
- 1
pmapi/src/main/java/com/ningdatech/pmapi/user/controller/UserAuthController.java Datei anzeigen

@@ -75,7 +75,7 @@ public class UserAuthController {
response.setContentType(StrPool.CONTENT_TYPE);
Cookie cookie = new Cookie(BizConst.COOKIE_KEY, null);
cookie.setPath(request.getContextPath() + "/");
cookie.setMaxAge(SessionTimeConstant.SESSION_TIME_SECONDS);
cookie.setMaxAge(SessionTimeConstant.SESSION_EXPIRED);
response.addCookie(cookie);
response.setStatus(HttpStatus.UNAUTHORIZED.value());
response.getWriter().write(objectMapper.writeValueAsString(BizConst.UNAUTHENTICATED));


+ 1
- 0
pmapi/src/main/java/com/ningdatech/pmapi/user/security/auth/constants/SessionTimeConstant.java Datei anzeigen

@@ -8,5 +8,6 @@ package com.ningdatech.pmapi.user.security.auth.constants;
public class SessionTimeConstant {

public static final Integer SESSION_TIME_SECONDS = 24 * 60 * 60 * 10;
public static final Integer SESSION_EXPIRED = 0;

}

Laden…
Abbrechen
Speichern