diff --git a/src/main/java/stirling/software/SPDF/config/security/UserAuthenticationFilter.java b/src/main/java/stirling/software/SPDF/config/security/UserAuthenticationFilter.java index 10de4ea9..c3fe63b4 100644 --- a/src/main/java/stirling/software/SPDF/config/security/UserAuthenticationFilter.java +++ b/src/main/java/stirling/software/SPDF/config/security/UserAuthenticationFilter.java @@ -58,7 +58,7 @@ public class UserAuthenticationFilter extends OncePerRequestFilter { try { // Use API key to authenticate. This requires you to have an authentication // provider for API keys. - Optional user = userService.loadUserByApiKey(apiKey); + Optional user = userService.getUserByApiKey(apiKey); if (!user.isPresent()) { response.setStatus(HttpStatus.UNAUTHORIZED.value()); response.getWriter().write("Invalid API Key.");