update #5
1 changed files with 1 additions and 1 deletions
|
@ -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 a new issue