Skip to content

Commit

Permalink
feat: Allow VCI issuer to also supply the issuer DID when the credent…
Browse files Browse the repository at this point in the history
…ial issuer is an object without an id
  • Loading branch information
nklomp committed Aug 17, 2023
1 parent a72f103 commit 7c72d31
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/oid4vci-issuer/src/functions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,8 @@ export function getCredentialSignerCallback(didOpts: IDIDOptions, context: IRequ
proofFormat = format?.includes('ld') ? 'lds' : 'jwt'
if (!credential.issuer && didOpts.identifierOpts.identifier) {
credential.issuer = toDID(didOpts.identifierOpts.identifier)
} else if (typeof credential.issuer === 'object' && !credential.issuer.id && didOpts.identifierOpts.identifier) {
credential.issuer.id = toDID(didOpts.identifierOpts.identifier)
}
const subjectIsArray = Array.isArray(credential.credentialSubject)
let credentialSubjects = Array.isArray(credential.credentialSubject) ? credential.credentialSubject : [credential.credentialSubject]
Expand Down

0 comments on commit 7c72d31

Please sign in to comment.