提交 566a3861 编写于 作者: xignzi006's avatar xignzi006 🇨🇳

更新 AuthorizationTokenFilter.java.ftl

上级 60ca82da
...@@ -63,7 +63,7 @@ public class AuthorizationTokenFilter extends OncePerRequestFilter { ...@@ -63,7 +63,7 @@ public class AuthorizationTokenFilter extends OncePerRequestFilter {
if (authTokenUtil.validateToken(authToken, userDetails)) { if (authTokenUtil.validateToken(authToken, userDetails)) {
UsernamePasswordAuthenticationToken authentication = new UsernamePasswordAuthenticationToken(userDetails, null, userDetails.getAuthorities()); UsernamePasswordAuthenticationToken authentication = new UsernamePasswordAuthenticationToken(userDetails, null, userDetails.getAuthorities());
authentication.setDetails(new WebAuthenticationDetailsSource().buildDetails(request)); authentication.setDetails(new WebAuthenticationDetailsSource().buildDetails(request));
log.info("authorizated user '{}', setting security context", username); // log.info("authorizated user '{}', setting security context", username);
SecurityContextHolder.getContext().setAuthentication(authentication); SecurityContextHolder.getContext().setAuthentication(authentication);
} }
} }
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册