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