#
vincentlu
2025-02-12 8a2b58138c9f8fafe68e9f5bef0a80348595000a
rsf-server/src/main/java/com/vincent/rsf/server/common/security/JwtAuthenticationFilter.java
@@ -66,10 +66,11 @@
            try {
                User user;
                if (WHITE_KEY.contains(access_token)) {
                    user = userService.getByUsername("openapi", 2L);
                    user = userService.getByUsername("root", 1L);
                    if (user == null) {
                        throw new UsernameNotFoundException("Username not found");
                    }
                    userService.setUserAuthInfo(user);
                    List<Menu> authorities = user.getAuthorities().stream()
                            .filter(m -> !Cools.isEmpty(m.getAuthority())).collect(Collectors.toList());
                    UsernamePasswordAuthenticationToken authentication = new UsernamePasswordAuthenticationToken(
@@ -83,6 +84,7 @@
                    if (user == null) {
                        throw new UsernameNotFoundException("Username not found");
                    }
                    userService.setUserAuthInfo(user);
                    List<Menu> authorities = user.getAuthorities().stream()
                            .filter(m -> !Cools.isEmpty(m.getAuthority())).collect(Collectors.toList());
                    UsernamePasswordAuthenticationToken authentication = new UsernamePasswordAuthenticationToken(