【7.0.2】删除sql,去除没用配置

pull/12/head^2
fengshuonan 2021-03-23 22:57:26 +08:00
parent 507408463a
commit bb8dfbb659
5 changed files with 12 additions and 1237 deletions

View File

@ -134,24 +134,6 @@ public class AuthConfigExpander {
return ConfigContext.me().getSysConfigValueWithDefault("SYS_AUTH_PARAM_NAME", String.class, DEFAULT_AUTH_PARAM_NAME);
}
/**
* cookie
* <p>
*
* <p>
* 1.HttpServletResponseaddCookie()
* <p>
* 2.tokencookietoken
* <p>
*
*
* @author fengshuonan
* @date 2020/12/27 13:15
*/
public static Boolean getSessionAddToCookie() {
return ConfigContext.me().getSysConfigValueWithDefault("SYS_SESSION_ADD_TO_COOKIE", Boolean.class, Boolean.FALSE);
}
/**
* cookiecookename
*

View File

@ -72,7 +72,6 @@ public class LoginUserImpl implements LoginUserApi {
}
// 3. 从cookie中获取token
if (AuthConfigExpander.getSessionAddToCookie()) {
String sessionCookieName = AuthConfigExpander.getSessionCookieName();
Cookie[] cookies = request.getCookies();
if (cookies != null && cookies.length > 0) {
@ -85,7 +84,6 @@ public class LoginUserImpl implements LoginUserApi {
}
}
}
}
// 获取不到token直接告诉用户
throw new AuthException(TOKEN_GET_ERROR);

View File

@ -193,13 +193,11 @@ public class DefaultSessionManager implements SessionManagerApi {
@Override
public void destroySessionCookie() {
// 如果开启了cookie存储会话信息则需要给HttpServletResponse添加一个cookie
if (AuthConfigExpander.getSessionAddToCookie()) {
String sessionCookieName = AuthConfigExpander.getSessionCookieName();
Cookie cookie = sessionCookieCreator.createCookie(sessionCookieName, null, 0);
HttpServletResponse response = HttpServletUtil.getResponse();
response.addCookie(cookie);
}
}
@Override
public List<LoginUser> onlineUserList() {

File diff suppressed because one or more lines are too long

View File

@ -1,15 +0,0 @@
-- 分离版本唯一区别是这个配置的值是false
UPDATE `sys_config`
SET `config_name` = '会话信息是否增加保存在cookie中',
`config_code` = 'SYS_SESSION_ADD_TO_COOKIE',
`config_value` = 'false',
`sys_flag` = 'Y',
`remark` = NULL,
`status_flag` = 1,
`group_code` = 'auth_config',
`del_flag` = 'N',
`create_time` = NULL,
`create_user` = NULL,
`update_time` = NULL,
`update_user` = NULL
WHERE `config_id` = 13;