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:
parent
90cbcde029
commit
b23784f598
@ -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.");
|
||||
|
Loading…
Reference in New Issue
Block a user