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

commit commit

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