|
@@ -196,6 +196,8 @@ public class SSOLoginLogoutController {
|
|
|
loginResult.setUpdate(false);
|
|
|
return loginResult;
|
|
|
}else {
|
|
|
+ response.setHeader("Set-Cookie", String.format("EIToken=%s; Max-Age=3600; Path=/", eiToken));
|
|
|
+
|
|
|
// 如果没有联锁token,或者有但与sso现在登录的账号名字不一样,都需要登录并返回登录信息
|
|
|
if(lsToken==null || "".equals(lsToken) || !usernameSSO.equals(JwtUtil.getUsername(lsToken))){
|
|
|
//1. 校验用户是否有效
|
|
@@ -265,7 +267,8 @@ public class SSOLoginLogoutController {
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
- response.setHeader("Set-Cookie", String.format("EIToken=%s; Max-Age=3600; Path=/; Secure; SameSite=None", eiToken));
|
|
|
+// response.setHeader("Set-Cookie", String.format("EIToken=%s; Max-Age=3600; Path=/; Secure; SameSite=None", eiToken));
|
|
|
+ response.setHeader("Set-Cookie", String.format("EIToken=%s; Max-Age=3600; Path=/", eiToken));
|
|
|
|
|
|
//1. 校验用户是否有效
|
|
|
SysUser sysUser = sysUserService.getUserAll(username);
|
|
@@ -509,7 +512,7 @@ public class SSOLoginLogoutController {
|
|
|
String msg = IoTedgessolgout(response);
|
|
|
if(!SSOConstants.LOGOUT_SUCCESS.equals(msg)) return Result.error(msg);
|
|
|
|
|
|
- response.setHeader("Set-Cookie", String.format("EIToken=%s; Max-Age=0; Path=/; Secure; SameSite=None", ""));
|
|
|
+ response.setHeader("Set-Cookie", String.format("EIToken=%s; Max-Age=0; Path=/", ""));
|
|
|
|
|
|
//用户退出逻辑
|
|
|
String token = request.getHeader(CommonConstant.X_ACCESS_TOKEN);
|