From b5cb7d8441af059dd86a6a40aa6965e412aee65d Mon Sep 17 00:00:00 2001 From: huangweixiong Date: Fri, 25 Nov 2022 16:22:44 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E6=8E=89=E5=90=8E=E5=8F=B0=E5=86=99co?= =?UTF-8?q?okie?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../renren/modules/security/oauth2/Oauth2Filter.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/renren-admin/src/main/java/io/renren/modules/security/oauth2/Oauth2Filter.java b/renren-admin/src/main/java/io/renren/modules/security/oauth2/Oauth2Filter.java index 7cf3d6be..cc7573ce 100644 --- a/renren-admin/src/main/java/io/renren/modules/security/oauth2/Oauth2Filter.java +++ b/renren-admin/src/main/java/io/renren/modules/security/oauth2/Oauth2Filter.java @@ -237,9 +237,9 @@ public class Oauth2Filter extends AuthenticatingFilter { Result result = sysUserTokenService.createToken(sysUserEntity.getId()); Object token = result.getData().get(Constant.TOKEN_HEADER); String currentToken = (String) token; - Cookie cookie = new Cookie(Constant.TOKEN_HEADER, currentToken); - cookie.setPath("/"); - response.addCookie(cookie); +// Cookie cookie = new Cookie(Constant.TOKEN_HEADER, currentToken); +// cookie.setPath("/"); +// response.addCookie(cookie); response.addHeader(Constant.TOKEN_HEADER, currentToken); //回调不涉及其他页面回调,先写死回调首页 String removeCreditParame = "http://" + urlBuilder.getHost() + ":" + urlBuilder.getPort() + "/#/home"; @@ -267,9 +267,9 @@ public class Oauth2Filter extends AuthenticatingFilter { Result result = sysUserTokenService.createToken(sysUserEntity.getId()); Object token = result.getData().get(Constant.TOKEN_HEADER); String currentToken = (String) token; - Cookie cookie = new Cookie(Constant.TOKEN_HEADER, currentToken); - cookie.setPath("/"); - response.addCookie(cookie); +// Cookie cookie = new Cookie(Constant.TOKEN_HEADER, currentToken); +// cookie.setPath("/"); +// response.addCookie(cookie); response.addHeader(Constant.TOKEN_HEADER, currentToken); //去掉凭证参数 String removeCreditParame = ssoValidator.removeCreditParame(requestUri);