mirror of
https://github.com/Frooodle/Stirling-PDF.git
synced 2025-12-18 20:04:17 +01:00
moar cleanup
This commit is contained in:
parent
d4ac6148d8
commit
dbd899dc99
@ -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();
|
||||
|
||||
@ -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)))
|
||||
|
||||
Loading…
Reference in New Issue
Block a user