Merge branch 'master' into docker_package
This commit is contained in:
commit
ed237c62ee
|
@ -14,7 +14,6 @@ import io.renren.modules.log.service.SysLogLoginService;
|
|||
import io.renren.modules.security.dto.LoginDTO;
|
||||
import io.renren.modules.security.oauth2.Oauth2Filter;
|
||||
import io.renren.modules.security.oauth2.SSOValidator;
|
||||
import io.renren.modules.security.oauth2.YaWeiCookieManage;
|
||||
import io.renren.modules.security.password.PasswordUtils;
|
||||
import io.renren.modules.security.service.CaptchaService;
|
||||
import io.renren.modules.security.service.SysUserTokenService;
|
||||
|
@ -28,6 +27,7 @@ import io.swagger.annotations.ApiImplicitParam;
|
|||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.shiro.subject.Subject;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
@ -45,6 +45,8 @@ import java.io.IOException;
|
|||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
|
||||
import static org.apache.shiro.SecurityUtils.getSubject;
|
||||
|
||||
/**
|
||||
* 登录
|
||||
*/
|
||||
|
@ -188,6 +190,9 @@ public class LoginController {
|
|||
response.addHeader("REDIRECT", ssoValidator.getLogoutUrl());
|
||||
}
|
||||
|
||||
Subject subject = getSubject();
|
||||
subject.logout();
|
||||
|
||||
return new Result();
|
||||
}
|
||||
|
||||
|
|
|
@ -38,7 +38,6 @@ public class SysUserTokenServiceImpl extends BaseServiceImpl<SysUserTokenDao, Sy
|
|||
token = TokenGenerator.generateValue();
|
||||
|
||||
SysUserTokenEntity tokenEntity = new SysUserTokenEntity();
|
||||
tokenEntity = new SysUserTokenEntity();
|
||||
tokenEntity.setUserId(userId);
|
||||
tokenEntity.setToken(token);
|
||||
tokenEntity.setUpdateDate(now);
|
||||
|
|
Loading…
Reference in New Issue