diff --git a/sdjwt/sdjwt.py b/sdjwt/sdjwt.py index 8cddc05..40906e0 100644 --- a/sdjwt/sdjwt.py +++ b/sdjwt/sdjwt.py @@ -508,6 +508,13 @@ def iterate_mapping(obj, path): if terms_of_use: vc["termsOfUse"] = terms_of_use if credential_metadata: + credential_metadata.pop("issuanceDate","") + credential_metadata.pop("expirationDate","") + credential_metadata.pop("credentialSchema",[]) + credential_metadata.pop("credentialStatus",{}) + credential_metadata.pop("credentialSubject",{}) + credential_metadata.pop("type",[]) + vc.update(credential_metadata) jwt_credential = create_jwt( @@ -618,6 +625,13 @@ def iterate_mapping(obj, path): if terms_of_use: vc["termsOfUse"] = terms_of_use if credential_metadata: + credential_metadata.pop("issuanceDate","") + credential_metadata.pop("expirationDate","") + credential_metadata.pop("credentialSchema",[]) + credential_metadata.pop("credentialStatus",{}) + credential_metadata.pop("credentialSubject",{}) + credential_metadata.pop("type",[]) + vc.update(credential_metadata) jwt_credential = create_jwt(