mirror of
https://github.com/Stirling-Tools/Stirling-PDF.git
synced 2025-06-23 16:05:09 +00:00
resolving conflicts
This commit is contained in:
parent
8f5a426295
commit
dba4cb20fd
proprietary/src/main/java/stirling/software/proprietary/security
stirling-pdf
build.gradle
src/main/java/stirling/software/SPDF
@ -1,8 +1,4 @@
|
||||
<<<<<<<< HEAD:proprietary/src/main/java/stirling/software/proprietary/security/CustomLogoutSuccessHandler.java
|
||||
package stirling.software.proprietary.security;
|
||||
========
|
||||
package stirling.software.enterprise.security;
|
||||
>>>>>>>> f833293d (renaming module):enterprise/src/main/java/stirling/software/enterprise/security/CustomLogoutSuccessHandler.java
|
||||
|
||||
import java.io.IOException;
|
||||
import java.security.cert.X509Certificate;
|
||||
@ -32,13 +28,8 @@ import stirling.software.common.model.ApplicationProperties.Security.OAUTH2;
|
||||
import stirling.software.common.model.ApplicationProperties.Security.SAML2;
|
||||
import stirling.software.common.model.oauth2.KeycloakProvider;
|
||||
import stirling.software.common.util.UrlUtils;
|
||||
<<<<<<<< HEAD:proprietary/src/main/java/stirling/software/proprietary/security/CustomLogoutSuccessHandler.java
|
||||
import stirling.software.proprietary.security.saml2.CertificateUtils;
|
||||
import stirling.software.proprietary.security.saml2.CustomSaml2AuthenticatedPrincipal;
|
||||
========
|
||||
import stirling.software.enterprise.security.saml2.CertificateUtils;
|
||||
import stirling.software.enterprise.security.saml2.CustomSaml2AuthenticatedPrincipal;
|
||||
>>>>>>>> f833293d (renaming module):enterprise/src/main/java/stirling/software/enterprise/security/CustomLogoutSuccessHandler.java
|
||||
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
@ -50,8 +41,6 @@ public class CustomLogoutSuccessHandler extends SimpleUrlLogoutSuccessHandler {
|
||||
|
||||
private final AppConfig appConfig;
|
||||
|
||||
private final AppConfig appConfig;
|
||||
|
||||
@Override
|
||||
public void onLogoutSuccess(
|
||||
HttpServletRequest request, HttpServletResponse response, Authentication authentication)
|
||||
|
@ -99,7 +99,7 @@ sourceSets {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -118,7 +118,7 @@ bootJar {
|
||||
// from {
|
||||
// configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
|
||||
// }
|
||||
|
||||
|
||||
// Exclude signature files to prevent "Invalid signature file digest" errors
|
||||
exclude 'META-INF/*.SF'
|
||||
exclude 'META-INF/*.DSA'
|
||||
@ -134,4 +134,4 @@ bootJar {
|
||||
}
|
||||
|
||||
bootJar.dependsOn ':common:jar'
|
||||
bootJar.dependsOn ':proprietary:jar'
|
||||
bootJar.dependsOn ':proprietary:jar'
|
||||
|
@ -1,4 +1,4 @@
|
||||
package stirling.software.SPDF.service;
|
||||
package stirling.software.SPDF.config;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
@ -15,7 +15,7 @@ import stirling.software.common.model.ApplicationProperties;
|
||||
|
||||
@Slf4j
|
||||
@Service
|
||||
public class EndpointConfigurationService {
|
||||
public class EndpointConfiguration {
|
||||
|
||||
private static final String REMOVE_BLANKS = "remove-blanks";
|
||||
private final ApplicationProperties applicationProperties;
|
||||
@ -23,7 +23,7 @@ public class EndpointConfigurationService {
|
||||
private Map<String, Set<String>> endpointGroups = new ConcurrentHashMap<>();
|
||||
private final boolean runningProOrHigher;
|
||||
|
||||
public EndpointConfigurationService(
|
||||
public EndpointConfiguration(
|
||||
ApplicationProperties applicationProperties,
|
||||
@Qualifier("runningProOrHigher") boolean runningProOrHigher) {
|
||||
this.applicationProperties = applicationProperties;
|
||||
|
@ -1,21 +1,18 @@
|
||||
package stirling.software.SPDF.config;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.servlet.HandlerInterceptor;
|
||||
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import stirling.software.SPDF.service.EndpointConfigurationService;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.servlet.HandlerInterceptor;
|
||||
|
||||
@Component
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
public class EndpointInterceptor implements HandlerInterceptor {
|
||||
|
||||
private final EndpointConfigurationService endpointConfigurationService;
|
||||
private final EndpointConfiguration endpointConfiguration;
|
||||
|
||||
@Override
|
||||
public boolean preHandle(
|
||||
@ -38,10 +35,10 @@ public class EndpointInterceptor implements HandlerInterceptor {
|
||||
}
|
||||
|
||||
log.debug("Request endpoint: {}", requestEndpoint);
|
||||
isEnabled = endpointConfigurationService.isEndpointEnabled(requestEndpoint);
|
||||
isEnabled = endpointConfiguration.isEndpointEnabled(requestEndpoint);
|
||||
log.debug("Is endpoint enabled: {}", isEnabled);
|
||||
} else {
|
||||
isEnabled = endpointConfigurationService.isEndpointEnabled(requestURI);
|
||||
isEnabled = endpointConfiguration.isEndpointEnabled(requestURI);
|
||||
}
|
||||
|
||||
if (!isEnabled) {
|
||||
|
@ -16,7 +16,7 @@ import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
||||
import stirling.software.SPDF.service.EndpointConfigurationService;
|
||||
import stirling.software.SPDF.config.EndpointConfiguration;
|
||||
import stirling.software.common.configuration.InstallationPathConfig;
|
||||
import stirling.software.common.model.ApplicationProperties;
|
||||
import stirling.software.common.util.GeneralUtils;
|
||||
@ -29,7 +29,7 @@ import stirling.software.common.util.GeneralUtils;
|
||||
public class SettingsController {
|
||||
|
||||
private final ApplicationProperties applicationProperties;
|
||||
private final EndpointConfigurationService endpointConfigurationService;
|
||||
private final EndpointConfiguration endpointConfiguration;
|
||||
|
||||
@PostMapping("/update-enable-analytics")
|
||||
@Hidden
|
||||
@ -48,6 +48,6 @@ public class SettingsController {
|
||||
@GetMapping("/get-endpoints-status")
|
||||
@Hidden
|
||||
public ResponseEntity<Map<String, Boolean>> getDisabledEndpoints() {
|
||||
return ResponseEntity.ok(endpointConfigurationService.getEndpointStatuses());
|
||||
return ResponseEntity.ok(endpointConfiguration.getEndpointStatuses());
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user