提交 8d295b46 编写于 作者: Z zhourui

restore setResponseToken method

上级 a580ea3f
...@@ -96,7 +96,7 @@ public class HttpToken { ...@@ -96,7 +96,7 @@ public class HttpToken {
public void deleteToken(HttpServletRequest request, HttpServletResponse response) throws Exception { public void deleteToken(HttpServletRequest request, HttpServletResponse response) throws Exception {
try { try {
// String cookie = X_Token + "=anonymous; path=/; domain=" + // String cookie = X_Token + "=; path=/; domain=" +
// this.domain(request) + "; max-age=0 // this.domain(request) + "; max-age=0
String cookie = X_Token + "=" + COOKIE_ANONYMOUS_VALUE + "; path=/; domain=" + this.domain(request) String cookie = X_Token + "=" + COOKIE_ANONYMOUS_VALUE + "; path=/; domain=" + this.domain(request)
+ "; HttpOnly"; + "; HttpOnly";
...@@ -135,14 +135,14 @@ public class HttpToken { ...@@ -135,14 +135,14 @@ public class HttpToken {
} }
} }
// public void setResponseToken(HttpServletRequest request, HttpServletResponse response, String tokenName, public void setResponseToken(HttpServletRequest request, HttpServletResponse response, String tokenName,
// String token) throws Exception { String token) throws Exception {
// if (!StringUtils.isEmpty(token)) { if (!StringUtils.isEmpty(token)) {
// String cookie = tokenName + "=" + token + "; path=/; domain=" + this.domain(request) + "; HttpOnly"; String cookie = tokenName + "=" + token + "; path=/; domain=" + this.domain(request) + "; HttpOnly";
// response.setHeader("Set-Cookie", cookie); response.setHeader("Set-Cookie", cookie);
// response.setHeader(tokenName, token); response.setHeader(tokenName, token);
// } }
// } }
public String getToken(HttpServletRequest request) throws Exception { public String getToken(HttpServletRequest request) throws Exception {
String token = null; String token = null;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册