forked from openwallet-foundation/credo-ts
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(anoncreds): include prover_did for legacy indy (openwallet-founda…
…tion#1342) Signed-off-by: Ariel Gentile <[email protected]>
- Loading branch information
Showing
8 changed files
with
20 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,6 +53,7 @@ import { | |
createAndLinkAttachmentsToPreview, | ||
} from '../utils/credential' | ||
import { AnonCredsCredentialMetadataKey, AnonCredsCredentialRequestMetadataKey } from '../utils/metadata' | ||
import { generateLegacyProverDidLikeString } from '../utils/proverDid' | ||
|
||
const INDY_CRED_ABSTRACT = 'hlindy/[email protected]' | ||
const INDY_CRED_REQUEST = 'hlindy/[email protected]' | ||
|
@@ -244,6 +245,12 @@ export class LegacyIndyCredentialFormatService implements CredentialFormatServic | |
linkSecretId: credentialFormats?.indy?.linkSecretId, | ||
}) | ||
|
||
if (!credentialRequest.prover_did) { | ||
// We just generate a prover did like string, as it's not used for anything and we don't need | ||
// to prove ownership of the did. It's deprecated in AnonCreds v1, but kept for backwards compatibility | ||
credentialRequest.prover_did = generateLegacyProverDidLikeString() | ||
} | ||
|
||
credentialRecord.metadata.set<AnonCredsCredentialRequestMetadata>( | ||
AnonCredsCredentialRequestMetadataKey, | ||
credentialRequestMetadata | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters