2323import static org .privacyidea .PIConstants .DETAIL ;
2424import static org .privacyidea .PIConstants .ERROR ;
2525import static org .privacyidea .PIConstants .ID ;
26+ import static org .privacyidea .PIConstants .IMAGE ;
2627import static org .privacyidea .PIConstants .INFO ;
2728import static org .privacyidea .PIConstants .JSONRPC ;
2829import static org .privacyidea .PIConstants .MAXFAIL ;
@@ -185,6 +186,7 @@ public PIResponse parsePIResponse(String serverResponse)
185186 JsonObject detail = obj .getAsJsonObject (DETAIL );
186187 response .preferredClientMode = getString (detail , PREFERRED_CLIENT_MODE );
187188 response .message = getString (detail , MESSAGE );
189+ response .image = getString (detail , IMAGE );
188190 response .serial = getString (detail , SERIAL );
189191 response .transactionID = getString (detail , TRANSACTION_ID );
190192 response .type = getString (detail , TYPE );
@@ -211,22 +213,23 @@ public PIResponse parsePIResponse(String serverResponse)
211213 .getAsJsonObject ();
212214 String serial = getString (challenge , SERIAL );
213215 String message = getString (challenge , MESSAGE );
216+ String image = getString (challenge , IMAGE );
214217 String transactionid = getString (challenge , TRANSACTION_ID );
215218 String type = getString (challenge , TYPE );
216219
217220 if (TOKEN_TYPE_WEBAUTHN .equals (type ))
218221 {
219222 String webAuthnSignRequest = getSignRequestFromAttributes (WEBAUTHN_SIGN_REQUEST , challenge );
220- response .multichallenge .add (new WebAuthn (serial , message , transactionid , webAuthnSignRequest ));
223+ response .multichallenge .add (new WebAuthn (serial , message , image , transactionid , webAuthnSignRequest ));
221224 }
222225 else if (TOKEN_TYPE_U2F .equals (type ))
223226 {
224227 String u2fSignRequest = getSignRequestFromAttributes (U2F_SIGN_REQUEST , challenge );
225- response .multichallenge .add (new U2F (serial , message , transactionid , u2fSignRequest ));
228+ response .multichallenge .add (new U2F (serial , message , image , transactionid , u2fSignRequest ));
226229 }
227230 else
228231 {
229- response .multichallenge .add (new Challenge (serial , message , transactionid , type ));
232+ response .multichallenge .add (new Challenge (serial , message , image , transactionid , type ));
230233 }
231234 }
232235 }
@@ -356,6 +359,7 @@ private TokenInfo parseSingleTokenInfo(String json)
356359 info .revoked = getBoolean (obj , "revoked" );
357360 info .rolloutState = getString (obj , "rollout_state" );
358361 info .serial = getString (obj , SERIAL );
362+ info .image = getString (obj , IMAGE );
359363 info .syncWindow = getInt (obj , "sync_window" );
360364 info .tokenType = getString (obj , "tokentype" );
361365 info .userEditable = getBoolean (obj , "user_editable" );
0 commit comments