refactor: 关闭本地run.mode配置

This commit is contained in:
CaptainB 2021-10-28 17:49:54 +08:00 committed by 刘瑞斌
parent 8579d8dd4a
commit 1bc2dd9c01
1 changed files with 0 additions and 11 deletions

View File

@ -37,9 +37,6 @@ public class LocalRealm extends BaseRealm {
@Resource
private UserService userService;
@Value("${run.mode:release}")
private String runMode;
@Override
public String getName() {
return "LOCAL";
@ -71,14 +68,6 @@ public class LocalRealm extends BaseRealm {
String userId = token.getUsername();
String password = String.valueOf(token.getPassword());
if (StringUtils.equals("local", runMode)) {
UserDTO user = getUserWithOutAuthenticate(userId);
userId = user.getId();
SessionUser sessionUser = SessionUser.fromUser(user);
SessionUtils.putUser(sessionUser);
return new SimpleAuthenticationInfo(userId, password, getName());
}
if (StringUtils.equals(login, UserSource.LOCAL.name())) {
return loginLocalMode(userId, password);
}