提交 d4a2384d authored 作者: Whispa's avatar Whispa

commit commit

上级 c71f576d
...@@ -94,10 +94,15 @@ public class AuthController extends Controller { ...@@ -94,10 +94,15 @@ public class AuthController extends Controller {
return notFound; return notFound;
} }
TbCfUserInfo userInfo = byAccount.get();
fixCode(userInfo);
Authentication authentication; Authentication authentication;
try { try {
authentication = authenticationManager.authenticate( authentication = authenticationManager.authenticate(
new UsernamePasswordAuthenticationToken(byAccount.get().getUserId(), loginRequest.getPassword())); new UsernamePasswordAuthenticationToken(userInfo.getUserId(), loginRequest.getPassword()));
} catch (BadCredentialsException e) { } catch (BadCredentialsException e) {
return new Result(ResultCodeEnum.VALIDATE_ERROR.getCode(), "Invalid username or password"); return new Result(ResultCodeEnum.VALIDATE_ERROR.getCode(), "Invalid username or password");
} }
...@@ -110,7 +115,6 @@ public class AuthController extends Controller { ...@@ -110,7 +115,6 @@ public class AuthController extends Controller {
// .map(GrantedAuthority::getAuthority) // .map(GrantedAuthority::getAuthority)
// .collect(Collectors.toList()); // .collect(Collectors.toList());
TbCfUserInfo userInfo = byAccount.get();
userInfo.setToken(jwt); userInfo.setToken(jwt);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论