@@ -118,15 +118,17 @@ private void handleUserinfo(RoutingContext rc) {
118118 jo .put ("groups" , new JsonArray (groups ));
119119 jo .put ("email" , idJwt .getClaims ().get ("email" ));
120120
121- JsonObject userDetails = new JsonObject ();
122- userDetails .put ("email" , idJwt .getClaims ().get ("email" ));
123- userDetails .put ("sub" , idJwt .getClaims ().get ("sub" ));
124- userDetails .put ("path" , "/login" );
125-
126- LOGGER .info ("Authenticated user accessing admin page - User: {}" , userDetails .toString ());
127- rc .put ("user_details" , userDetails );
128- this .audit .log (rc , new AuditParams ());
129-
121+ if (rc .get ("user_details" ) == null ) {
122+ JsonObject userDetails = new JsonObject ();
123+ userDetails .put ("email" , idJwt .getClaims ().get ("email" ));
124+ userDetails .put ("sub" , idJwt .getClaims ().get ("sub" ));
125+ userDetails .put ("path" , "/login" );
126+
127+ LOGGER .info ("Authenticated user accessing admin page - User: {}" , userDetails .toString ());
128+ rc .put ("user_details" , userDetails );
129+ this .audit .log (rc , new AuditParams ());
130+ }
131+
130132 rc .response ().setStatusCode (200 ).end (jo .toString ());
131133 } catch (Exception e ) {
132134 if (rc .session () != null ) {
0 commit comments