1
0
mirror of https://github.com/Stirling-Tools/Stirling-PDF.git synced 2024-11-23 15:21:25 +01:00

Fix: authentication ApiKey NullPointerException (#1744)

This commit is contained in:
Ludy 2024-08-23 12:10:58 +02:00 committed by GitHub
parent 90cbcde029
commit b23784f598
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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> user = userService.loadUserByApiKey(apiKey);
Optional<User> user = userService.getUserByApiKey(apiKey);
if (!user.isPresent()) {
response.setStatus(HttpStatus.UNAUTHORIZED.value());
response.getWriter().write("Invalid API Key.");