|
@@ -56,13 +56,15 @@ public class JwtAuthenticationTokenFilter extends OncePerRequestFilter
|
|
|
if(StringUtils.isNoneEmpty(wxToken)){
|
|
|
ClientLoginUser clientLoginUser = wxTokenService.getLoginUser(request);
|
|
|
if(clientLoginUser!=null){
|
|
|
- wxTokenService.verifyToken(clientLoginUser);
|
|
|
- UsernamePasswordAuthenticationToken authenticationToken = new UsernamePasswordAuthenticationToken(clientLoginUser, null,null);
|
|
|
- authenticationToken.setDetails(new WebAuthenticationDetailsSource().buildDetails(request));
|
|
|
- SecurityContextHolder.getContext().setAuthentication(authenticationToken);
|
|
|
- }else{
|
|
|
- request.getRequestDispatcher("/app/common/token_offline").forward(request, response);
|
|
|
- return;
|
|
|
+ if(Validator.isNull(clientLoginUser.getUser())){
|
|
|
+ request.getRequestDispatcher("/app/common/token_offline").forward(request, response);
|
|
|
+ return;
|
|
|
+ }else{
|
|
|
+ wxTokenService.verifyToken(clientLoginUser);
|
|
|
+ UsernamePasswordAuthenticationToken authenticationToken = new UsernamePasswordAuthenticationToken(clientLoginUser, null,null);
|
|
|
+ authenticationToken.setDetails(new WebAuthenticationDetailsSource().buildDetails(request));
|
|
|
+ SecurityContextHolder.getContext().setAuthentication(authenticationToken);
|
|
|
+ }
|
|
|
}
|
|
|
}else{
|
|
|
if(!enabledTenant){
|