File tree Expand file tree Collapse file tree 1 file changed +3
-10
lines changed
src/main/java/com/danubetech/verifiablecredentials/jwt Expand file tree Collapse file tree 1 file changed +3
-10
lines changed Original file line number Diff line number Diff line change 1212import java .io .IOException ;
1313import java .net .URI ;
1414import java .util .Date ;
15+ import java .util .LinkedHashMap ;
1516import java .util .Map ;
1617
1718public class ToJwtConverter {
@@ -72,16 +73,8 @@ public static JwtVerifiableCredential toJwtVerifiableCredential(VerifiableCreden
7273 jwtPayloadBuilder .audience (aud );
7374 }
7475
75- try {
76- Map <String , Object > vcClaimValue = new ObjectMapper ().readValue (payloadVerifiableCredential .toJson (), Map .class );
77- jwtPayloadBuilder .claim (JwtKeywords .JWT_CLAIM_VC , vcClaimValue );
78- } catch (RuntimeException ex ) {
79- throw new RuntimeException (ex );
80- } catch (JsonParseException e ) {
81- e .printStackTrace ();
82- } catch (IOException e ) {
83- e .printStackTrace ();
84- }
76+ Map <String , Object > vcClaimValue = new LinkedHashMap <>(payloadVerifiableCredential .getJsonObject ());
77+ jwtPayloadBuilder .claim (JwtKeywords .JWT_CLAIM_VC , vcClaimValue );
8578
8679 JWTClaimsSet jwtPayload = jwtPayloadBuilder .build ();
8780
You can’t perform that action at this time.
0 commit comments