SEC-1396: Implement eager saving of SecurityContext in SessionManagementFilter on authentication.
The user is then seen as being authenticated to further (re-entrant) requests which occur before the existing request has completed. The saving logic is contained with the SecurityContextRepository implementation.
@ -98,7 +98,7 @@ public class HttpSessionSecurityContextRepository implements SecurityContextRepo
@@ -98,7 +98,7 @@ public class HttpSessionSecurityContextRepository implements SecurityContextRepo
// saveContext() might already be called by the response wrapper
// if something in the chain called sendError() or sendRedirect(). This ensures we only call it
// once per request.
@ -289,7 +289,7 @@ public class HttpSessionSecurityContextRepository implements SecurityContextRepo
@@ -289,7 +289,7 @@ public class HttpSessionSecurityContextRepository implements SecurityContextRepo
@ -327,7 +327,7 @@ public class HttpSessionSecurityContextRepository implements SecurityContextRepo
@@ -327,7 +327,7 @@ public class HttpSessionSecurityContextRepository implements SecurityContextRepo
@ -42,7 +42,7 @@ public abstract class SaveContextOnUpdateOrErrorResponseWrapper extends HttpServ
@@ -42,7 +42,7 @@ public abstract class SaveContextOnUpdateOrErrorResponseWrapper extends HttpServ
@ -78,6 +78,9 @@ public class SessionManagementFilter extends GenericFilterBean {
@@ -78,6 +78,9 @@ public class SessionManagementFilter extends GenericFilterBean {
return;
}
// Eagerly save the security context to make it available for any possible re-entrant
// requests which may occur before the current request completes. SEC-1396.