|
@ -47,6 +47,8 @@ public class AdminController { |
|
|
MatrixAdmin data = adminService.login(name, pwd, RequestContext.getRequestChannel()); |
|
|
MatrixAdmin data = adminService.login(name, pwd, RequestContext.getRequestChannel()); |
|
|
String token = JwtUtils.generatorToken(data.getId() + "", 15 * 86400); |
|
|
String token = JwtUtils.generatorToken(data.getId() + "", 15 * 86400); |
|
|
Cookie cookie = new Cookie("MatrixToken", token); |
|
|
Cookie cookie = new Cookie("MatrixToken", token); |
|
|
|
|
|
cookie.setHttpOnly(false); |
|
|
|
|
|
cookie.setPath("/"); |
|
|
RequestContext.getResponse().addCookie(cookie); |
|
|
RequestContext.getResponse().addCookie(cookie); |
|
|
return new R<>(R.CODE_SUCCESS, "ok", null); |
|
|
return new R<>(R.CODE_SUCCESS, "ok", null); |
|
|
} |
|
|
} |
|
|