Add session rollback handling in Connection.java, improve resource management, and refine debug logging in LoginController.
This commit is contained in:
@@ -95,8 +95,9 @@ public class LoginController implements LoginApi {
|
||||
public ResponseEntity<UsernameDto> getUsername() {
|
||||
log.debug("Loading username for logged in user");
|
||||
Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
|
||||
|
||||
log.debug("Loaded authentication for logged in user {}", authentication);
|
||||
if (authentication == null || !(authentication.getPrincipal() instanceof OAuth2ResourceServerProperties.Jwt)) {
|
||||
log.debug("Loaded authentication for logged in user is null or not a jwt");
|
||||
return ResponseEntity.status(401).build();
|
||||
}
|
||||
Jwt jwt = (Jwt) authentication.getPrincipal();
|
||||
|
||||
Reference in New Issue
Block a user