Skip to content

Commit

Permalink
Merge pull request #576 from 2060-io/fix/wallet-did-byo-attach
Browse files Browse the repository at this point in the history
fix: get wallet did only when not using USE_OOB_PRESENT_PROOF
  • Loading branch information
loneil authored Jul 9, 2024
2 parents 77ff110 + 44b7f69 commit 3b64c49
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions oidc-controller/api/routers/oidc.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,7 @@ async def get_authorize(request: Request, db: Database = Depends(get_db)):
pres_exch_dict = response.dict()

# Prepeare the presentation request
client = AcapyClient()
use_public_did = not settings.USE_OOB_LOCAL_DID_SERVICE
wallet_did = client.get_wallet_did(public=use_public_did)

byo_attachment = PresentProofv10Attachment.build(
pres_exch_dict["presentation_request"]
)

msg = None
if settings.USE_OOB_PRESENT_PROOF:
Expand All @@ -127,6 +121,11 @@ async def get_authorize(request: Request, db: Database = Depends(get_db)):
)
msg_contents = oob_invite_response.invitation
else:
wallet_did = client.get_wallet_did(public=use_public_did)

byo_attachment = PresentProofv10Attachment.build(
pres_exch_dict["presentation_request"]
)
s_d = ServiceDecorator(
service_endpoint=client.service_endpoint, recipient_keys=[wallet_did.verkey]
)
Expand Down

0 comments on commit 3b64c49

Please sign in to comment.