moar cleanup

This commit is contained in:
Dario Ghunney Ware 2025-12-16 10:34:52 +00:00
parent d4ac6148d8
commit dbd899dc99
2 changed files with 3 additions and 5 deletions

View File

@ -66,7 +66,6 @@ public class CustomLogoutSuccessHandler extends SimpleUrlLogoutSuccessHandler {
if (!response.isCommitted()) {
if (authentication != null) {
if (authentication instanceof OAuth2AuthenticationToken oAuthToken) {
log.info("OAuth2 logout via JWT - attempting OIDC logout");
getAuthRedirect(request, response, oAuthToken);
} else if (authentication instanceof Saml2Authentication samlAuthentication) {
getAuthRedirect(request, response, samlAuthentication);
@ -99,7 +98,6 @@ public class CustomLogoutSuccessHandler extends SimpleUrlLogoutSuccessHandler {
}
// Redirect for SAML2 authentication logout
private void getAuthRedirect(
HttpServletRequest request,
HttpServletResponse response,
@ -149,7 +147,6 @@ public class CustomLogoutSuccessHandler extends SimpleUrlLogoutSuccessHandler {
}
// Redirect for OAuth2 authentication logout
private void getAuthRedirect(
HttpServletRequest request,
HttpServletResponse response,
@ -176,7 +173,7 @@ public class CustomLogoutSuccessHandler extends SimpleUrlLogoutSuccessHandler {
}
}
// Redirect for JWT-based OAuth2 authentication logout
// Redirect for JWT-based authentication logout
private void getAuthRedirect(HttpServletRequest request, HttpServletResponse response)
throws IOException {
OAUTH2 oauth = securityProperties.getOauth2();

View File

@ -51,7 +51,8 @@ class UserLicenseSettingsServiceTest {
when(applicationProperties.getPremium()).thenReturn(premium);
when(applicationProperties.getAutomaticallyGenerated()).thenReturn(automaticallyGenerated);
when(automaticallyGenerated.getIsNewServer()).thenReturn(false); // Default: not a new server
when(automaticallyGenerated.getIsNewServer())
.thenReturn(false); // Default: not a new server
when(settingsRepository.findSettings()).thenReturn(Optional.of(mockSettings));
when(userService.getTotalUsersCount()).thenReturn(80L);
when(settingsRepository.save(any(UserLicenseSettings.class)))