去掉后台写cookie

This commit is contained in:
huangweixiong 2022-11-25 16:22:44 +08:00
parent 3199f917e7
commit b5cb7d8441
1 changed files with 6 additions and 6 deletions

View File

@ -237,9 +237,9 @@ public class Oauth2Filter extends AuthenticatingFilter {
Result<Map> 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<Map> 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);