mirror of
https://github.com/Stirling-Tools/Stirling-PDF.git
synced 2025-06-06 18:30:57 +00:00
a
Signed-off-by: a <a>
This commit is contained in:
parent
04a6ebf515
commit
f9677b1fe8
@ -56,17 +56,17 @@ public class UserAuthenticationFilter extends OncePerRequestFilter {
|
|||||||
Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
|
Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
|
||||||
|
|
||||||
// Check for session expiration (unsure if needed)
|
// Check for session expiration (unsure if needed)
|
||||||
// if (authentication != null && authentication.isAuthenticated()) {
|
// if (authentication != null && authentication.isAuthenticated()) {
|
||||||
// String sessionId = request.getSession().getId();
|
// String sessionId = request.getSession().getId();
|
||||||
// SessionInformation sessionInfo =
|
// SessionInformation sessionInfo =
|
||||||
// sessionPersistentRegistry.getSessionInformation(sessionId);
|
// sessionPersistentRegistry.getSessionInformation(sessionId);
|
||||||
//
|
//
|
||||||
// if (sessionInfo != null && sessionInfo.isExpired()) {
|
// if (sessionInfo != null && sessionInfo.isExpired()) {
|
||||||
// SecurityContextHolder.clearContext();
|
// SecurityContextHolder.clearContext();
|
||||||
// response.sendRedirect(request.getContextPath() + "/login?expired=true");
|
// response.sendRedirect(request.getContextPath() + "/login?expired=true");
|
||||||
// return;
|
// return;
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// Check for API key in the request headers if no authentication exists
|
// Check for API key in the request headers if no authentication exists
|
||||||
if (authentication == null || !authentication.isAuthenticated()) {
|
if (authentication == null || !authentication.isAuthenticated()) {
|
||||||
|
@ -30,7 +30,6 @@ public class CustomHttpSessionListener implements HttpSessionListener {
|
|||||||
"Session created: {} with count {}",
|
"Session created: {} with count {}",
|
||||||
se.getSession().getId(),
|
se.getSession().getId(),
|
||||||
activeSessions.incrementAndGet());
|
activeSessions.incrementAndGet());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -85,12 +85,12 @@ public class SessionPersistentRegistry implements SessionRegistry {
|
|||||||
|
|
||||||
if (principalName != null) {
|
if (principalName != null) {
|
||||||
// Clear old sessions for the principal (unsure if needed)
|
// Clear old sessions for the principal (unsure if needed)
|
||||||
// List<SessionEntity> existingSessions =
|
// List<SessionEntity> existingSessions =
|
||||||
// sessionRepository.findByPrincipalName(principalName);
|
// sessionRepository.findByPrincipalName(principalName);
|
||||||
// for (SessionEntity session : existingSessions) {
|
// for (SessionEntity session : existingSessions) {
|
||||||
// session.setExpired(true);
|
// session.setExpired(true);
|
||||||
// sessionRepository.save(session);
|
// sessionRepository.save(session);
|
||||||
// }
|
// }
|
||||||
|
|
||||||
SessionEntity sessionEntity = new SessionEntity();
|
SessionEntity sessionEntity = new SessionEntity();
|
||||||
sessionEntity.setSessionId(sessionId);
|
sessionEntity.setSessionId(sessionId);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user