mirror of
https://github.com/arsvendg/Stirling-PDF.git
synced 2026-07-16 11:23:10 +02:00
conflict fix again
This commit is contained in:
+5
-5
@@ -212,19 +212,19 @@ public class ProprietaryUIDataController {
|
||||
|
||||
if (latestSession.isPresent()) {
|
||||
SessionEntity sessionEntity = latestSession.get();
|
||||
Date lastAccessedTime = sessionEntity.getLastRequest();
|
||||
Instant lastAccessedTime =
|
||||
Optional.ofNullable(sessionEntity.getLastRequest())
|
||||
.orElse(Instant.EPOCH);
|
||||
Instant now = Instant.now();
|
||||
Instant expirationTime =
|
||||
lastAccessedTime
|
||||
.toInstant()
|
||||
.plus(maxInactiveInterval, ChronoUnit.SECONDS);
|
||||
lastAccessedTime.plus(maxInactiveInterval, ChronoUnit.SECONDS);
|
||||
|
||||
if (now.isAfter(expirationTime)) {
|
||||
sessionPersistentRegistry.expireSession(sessionEntity.getSessionId());
|
||||
} else {
|
||||
hasActiveSession = !sessionEntity.isExpired();
|
||||
}
|
||||
lastRequest = sessionEntity.getLastRequest();
|
||||
lastRequest = Date.from(lastAccessedTime);
|
||||
} else {
|
||||
lastRequest = new Date(0);
|
||||
}
|
||||
|
||||
+2
-2
@@ -60,14 +60,14 @@ public class InitialSecuritySetup {
|
||||
ApplicationProperties.Security.Jwt jwtProperties =
|
||||
applicationProperties.getSecurity().getJwt();
|
||||
|
||||
boolean jwtEnabled = jwtProperties.isEnabled();
|
||||
boolean jwtEnabled = jwtProperties.isEnableKeystore();
|
||||
if (!v2Enabled || !jwtEnabled) {
|
||||
log.debug(
|
||||
"V2 enabled: {}, JWT enabled: {} - disabling all JWT features",
|
||||
v2Enabled,
|
||||
jwtEnabled);
|
||||
|
||||
jwtProperties.setKeyCleanup(false);
|
||||
jwtProperties.setEnableKeyCleanup(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-6
@@ -10,11 +10,6 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
|
||||
<<<<<<< HEAD
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
=======
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
>>>>>>> refs/remotes/origin/V2
|
||||
import org.springframework.security.core.Authentication;
|
||||
import org.springframework.security.core.userdetails.UserDetails;
|
||||
import org.springframework.security.oauth2.core.user.OAuth2User;
|
||||
@@ -203,7 +198,7 @@ public class AccountWebController {
|
||||
return "login";
|
||||
}
|
||||
|
||||
//@EnterpriseEndpoint
|
||||
// @EnterpriseEndpoint
|
||||
// @PreAuthorize("hasRole('ROLE_ADMIN')")
|
||||
// @GetMapping("/usage")
|
||||
|
||||
|
||||
+1
-1
@@ -4,8 +4,8 @@ import java.io.Serializable;
|
||||
|
||||
import org.springframework.security.core.GrantedAuthority;
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
|
||||
import jakarta.persistence.Column;
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.GeneratedValue;
|
||||
|
||||
+2
-1
@@ -38,7 +38,8 @@ public class CustomUserDetailsService implements UserDetailsService {
|
||||
"Your account has been locked due to too many failed login attempts.");
|
||||
}
|
||||
|
||||
// TODO: Remove for SaaS - Handle legacy users without authenticationType (from versions < 1.3.0)
|
||||
// TODO: Remove for SaaS - Handle legacy users without authenticationType (from versions <
|
||||
// 1.3.0)
|
||||
String authTypeStr = user.getAuthenticationType();
|
||||
if (authTypeStr == null || authTypeStr.isEmpty()) {
|
||||
// Migrate legacy users by detecting authentication type based on password presence
|
||||
|
||||
Reference in New Issue
Block a user