@@ -81,6 +81,8 @@ public class SsoNotificationController {
8181
8282 private static final String SSONOT_FAILED = "SSONOT_FAILED" ;
8383
84+ private static final String SSONOT_INITIATED = "SSONOT_INITIATED" ;
85+
8486 private static final String SSONOT_REDIRECT = "SSONOT_REDIRECT" ;
8587
8688 private static final String SSONOT_SUCCESS = "SSONOT_SUCCESS" ;
@@ -128,11 +130,14 @@ public void processSsoNotification(@RequestParam(required = false) String id,
128130 HttpServletRequest request , HttpServletResponse response )
129131 throws IOException {
130132
133+ // Add IdP id to logback and initiate
134+ MDC .put (IDP , String .valueOf (id ));
135+ MDC .put (EVENT , SSONOT_INITIATED );
136+
131137 LOGGER .info ("Request received with id ('{}') url ('{}') redirectUri ('{}') referrer ('{}') realm ('{}') " +
132138 "notificationCookie ('{}')" , id , url , redirectUri , referrer , realm , notificationCookie );
133139
134- // Add IdP id to logback and set default to failed
135- MDC .put (IDP , String .valueOf (id ));
140+ // Set default to failed
136141 MDC .put (EVENT , SSONOT_FAILED );
137142
138143 List <IdP > remoteSsoNotifications = idPProvider .getAllSsoNotifications ();
@@ -158,6 +163,7 @@ public void processSsoNotification(@RequestParam(required = false) String id,
158163 URL createdUrl = determineAndVerifyURL (idp , url , referrer );
159164
160165 // Set notification cookie
166+ MDC .put (EVENT , SSONOT_SUCCESS );
161167 LOGGER .info ("Setting notification Cookie ('{}') for id ('{}') with url ('{}') and realm ('{}')" ,
162168 COOKIE_NOTIFICATION , id , createdUrl , realm );
163169
@@ -171,7 +177,6 @@ public void processSsoNotification(@RequestParam(required = false) String id,
171177 response .sendRedirect (redirectUri );
172178 return ;
173179 }
174- MDC .put (EVENT , SSONOT_SUCCESS );
175180 EVENT_LOGGER .info ("Finished without redirecting" );
176181 }
177182
0 commit comments