Change log level to DEBUG in beta configuration and improve logging in LoginController.

This commit is contained in:
2025-07-06 19:23:38 +02:00
parent 42f0961f13
commit aef32a8982
2 changed files with 4 additions and 1 deletions
@@ -84,11 +84,13 @@ public class LoginController implements LoginApi {
@Override
public ResponseEntity<String> login(String code) {
if (code == null) {
log.warn("Received null login code");
return ResponseEntity.badRequest().build();
}
CacheEntry cacheEntry = cache.get(code);
if (cacheEntry == null || cacheEntry.expiry().isBefore(Instant.now())) {
log.warn("Received invalid login code {}", code);
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
@@ -96,6 +98,7 @@ public class LoginController implements LoginApi {
cache.remove(code);
log.debug("Generated token for user {}", cacheEntry.uuid);
return ResponseEntity.ok(token);
}