Skip to content

Commit

Permalink
Fix: Remove validation for SdJwt suffix and adding it automatically
Browse files Browse the repository at this point in the history
Signed-off-by: George J Padayatti <[email protected]>
  • Loading branch information
georgepadayatti committed May 14, 2024
1 parent 98d7ede commit 1c48f91
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions eudi_wallet/ebsi/entry_points/server/routes/v2/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -583,9 +583,9 @@ async def handle_post_issue_credential(request: Request, context: V2RequestConte

else:
assert credential.get("type", []) is not None
credential = validate_credential_type_based_on_disclosure_mapping(
credential=credential, disclosure_mapping=disclosure_mapping
)
# credential = validate_credential_type_based_on_disclosure_mapping(
# credential=credential, disclosure_mapping=disclosure_mapping
# )
credential_offer = await context.legal_entity_service.issue_credential_with_disclosure_mapping(
issuance_mode=issue_credential_req.issuanceMode,
is_pre_authorised=issue_credential_req.isPreAuthorised,
Expand Down
12 changes: 6 additions & 6 deletions eudi_wallet/ebsi/entry_points/server/v2_well_known.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,11 +144,11 @@ def create_credential_supported_from_credential_offers(credential_offers: list)
for credential_offer in credential_offers:
credential_types = credential_offer.credential.get("type", [])
if credential_types:
credential = validate_credential_type_based_on_disclosure_mapping(
credential=credential_offer.credential,
disclosure_mapping=credential_offer.disclosureMapping,
)
credential_types = credential.get("type", [])
# credential = validate_credential_type_based_on_disclosure_mapping(
# credential=credential_offer.credential,
# disclosure_mapping=credential_offer.disclosureMapping,
# )
credential_types = credential_offer.credential.get("type", [])

if credential_offer.disclosureMapping:
format = "vc+sd-jwt"
Expand All @@ -161,7 +161,7 @@ def create_credential_supported_from_credential_offers(credential_offers: list)
"cryptographic_suites_supported": ["ES256"],
"display": [
{
"name": credential_types[-1].removesuffix("SdJwt"),
"name": credential_types[-1],
"locale": "en-GB",
"background_color": "#12107c",
"text_color": "#FFFFFF",
Expand Down

0 comments on commit 1c48f91

Please sign in to comment.