api 테스터 세션 연장 추가
This commit is contained in:
@@ -2,13 +2,16 @@ package com.eactive.httpmockserver.login.controller;
|
||||
|
||||
import com.eactive.httpmockserver.user.service.UserService;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.security.core.Authentication;
|
||||
import org.springframework.security.core.context.SecurityContextHolder;
|
||||
import org.springframework.security.web.authentication.logout.SecurityContextLogoutHandler;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
@@ -47,7 +50,7 @@ public class LoginController {
|
||||
}
|
||||
|
||||
String message = (String) session.getAttribute(LOGIN_MESSAGE);
|
||||
if (StringUtils.isNotEmpty(message)){
|
||||
if (StringUtils.isNotEmpty(message)) {
|
||||
model.addAttribute(LOGIN_MESSAGE, message);
|
||||
}
|
||||
session.setAttribute(LOGIN_MESSAGE, null);
|
||||
@@ -61,14 +64,10 @@ public class LoginController {
|
||||
*
|
||||
* @return result - String
|
||||
*/
|
||||
@GetMapping(value = "/refreshSessionTimeout.do")
|
||||
public ModelAndView refreshSessionTimeout(@RequestParam Map<String, Object> commandMap) {
|
||||
ModelAndView modelAndView = new ModelAndView();
|
||||
modelAndView.setViewName("jsonView");
|
||||
|
||||
modelAndView.addObject("result", "ok");
|
||||
|
||||
return modelAndView;
|
||||
@GetMapping(value = "/refreshSessionTimeout.do", produces = "text/html;charset=utf-8")
|
||||
@ResponseBody
|
||||
public ResponseEntity<String> refreshSessionTimeout(@RequestParam Map<String, Object> commandMap) {
|
||||
return ResponseEntity.ok("success");
|
||||
}
|
||||
|
||||
@GetMapping("/actionLogout.do")
|
||||
|
||||
Reference in New Issue
Block a user