@@ -1608,24 +1608,24 @@ private static String getAuthenticationProcessSessionKey(int configurationId)
16081608 // consumed by handleAuthentication after secondary auth completes, so the reauth token can be issued without
16091609 // replacing the existing authenticated session. Survives the round-trip to external 2FA providers (Duo, TOTP),
16101610 // which is essential because their validate actions call handleAuthentication without form context.
1611- private record ReauthContext (boolean local ) {}
1611+ private record ReauthFlow (boolean local ) {}
16121612
1613- private static String getReauthContextSessionKey ()
1613+ private static String getReauthFlowSessionKey ()
16141614 {
1615- return AUTHENTICATION_PROCESS_PREFIX + ReauthContext .class .getName ();
1615+ return AUTHENTICATION_PROCESS_PREFIX + ReauthFlow .class .getName ();
16161616 }
16171617
1618- public static void setReauthContext (HttpServletRequest request , boolean local )
1618+ public static void setReauthFlow (HttpServletRequest request , boolean local )
16191619 {
1620- request .getSession (true ).setAttribute (getReauthContextSessionKey (), new ReauthContext (local ));
1620+ request .getSession (true ).setAttribute (getReauthFlowSessionKey (), new ReauthFlow (local ));
16211621 }
16221622
16231623 // Used by 2FA validate actions to tell whether the already-logged-in user is mid-reauth, so they don't
16241624 // short-circuit to the home page and skip the reauth-token issuance in handleAuthentication.
16251625 public static boolean isReauthInProgress (HttpServletRequest request )
16261626 {
16271627 HttpSession session = request .getSession (false );
1628- return session != null && session .getAttribute (getReauthContextSessionKey ()) != null ;
1628+ return session != null && session .getAttribute (getReauthFlowSessionKey ()) != null ;
16291629 }
16301630
16311631 // Clear all primary and secondary authentication results
@@ -1756,11 +1756,11 @@ public URLHelper getRedirectURL()
17561756 // Reauth path: primary (and any secondary) auth has completed. Issue the one-time reauth token on the return
17571757 // URL and bail out *before* setAuthenticatedUser runs, so the user's existing session is preserved. The local
17581758 // flag distinguishes local login-page reauth (must match current session user) from CAS IdP reauth (any user).
1759- ReauthContext reauthContext = (ReauthContext )session .getAttribute (getReauthContextSessionKey ());
1760- if (reauthContext != null )
1759+ ReauthFlow reauthFlow = (ReauthFlow )session .getAttribute (getReauthFlowSessionKey ());
1760+ if (reauthFlow != null )
17611761 {
1762- session .removeAttribute (getReauthContextSessionKey ());
1763- setReauthUser (primaryAuthUser , reauthContext .local () ? SecurityManager .getSessionUser (request ) : null , request , null , url );
1762+ session .removeAttribute (getReauthFlowSessionKey ());
1763+ setReauthUser (primaryAuthUser , reauthFlow .local () ? SecurityManager .getSessionUser (request ) : null , request , null , url );
17641764 return new AuthenticationResult (primaryAuthUser , url );
17651765 }
17661766
0 commit comments