refactor: 关闭本地run.mode配置
This commit is contained in:
parent
8579d8dd4a
commit
1bc2dd9c01
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue