Skip to content

Commit

Permalink
Fix L3-iGrant/api#566: Remove the following fields from credentialMet…
Browse files Browse the repository at this point in the history
…adata if present
  • Loading branch information
albinpa authored and georgepadayatti committed Oct 22, 2024
1 parent d1695ab commit 9c6083d
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions sdjwt/sdjwt.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit 9c6083d

Please sign in to comment.