-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
load a VC into a wallet via the internal API #2643
Conversation
description: | | ||
If a VerifiableCredential is obtained in another way or when it's created without publishing, this API allows to add it to a wallet. | ||
The DID of the holder has to be provided in the path. | ||
It's assumed that the credentialSubject.id equals the holder DID. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what if it doesn't? Do we still load it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right now, yes. I think the internal wallet API needs to change. Instead of calling Wallet()
on the VCR, it needs to be Wallet(holderDID)
because not all VC.credentialSubject.ID needs to equal the holder DID theoretically.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or add a wallet DID to the funcs (Put(ctx, walletDID, credential)
). Our dependency injection style makes it cumbersome to have non-multi-tenant interfaces (see OpenID handlers)
|
||
error returns: | ||
* 400 - Invalid credential |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or holder DID not managed by this node?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The current wallet does not group credentials by wallet. If you add a VC that is not owned, then you'll never be able to use it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does group them (on a shelf, identified by the credential subject DID), but without ownership check. So probably OK (we can always add the check later)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see comments
Co-authored-by: reinkrul <[email protected]>
closes #2642
primary use case is to load a VC into the wallet when issued to a web:did.