Skip to content

Commit

Permalink
VDX-76 removed vc subject interface property
Browse files Browse the repository at this point in the history
  • Loading branch information
BtencateSphereon committed Aug 8, 2022
1 parent d3f6c07 commit 8f95262
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 12 deletions.
1 change: 0 additions & 1 deletion lib/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ export interface IIssuerConfig {
export interface IDomainLinkageCredential {
'@context': string[]
issuer: string
subject?: string
credentialSubject: ICredentialSubject
type?: string[]
issuanceDate: string
Expand Down
4 changes: 0 additions & 4 deletions lib/verifier/WellKnownDidVerifier.ts
Original file line number Diff line number Diff line change
Expand Up @@ -360,10 +360,6 @@ export class WellKnownDidVerifier {
if (credential.issuer && credential.credentialSubject.id !== credential.issuer)
return Promise.reject({ status: ValidationStatusEnum.INVALID, message: 'Property credentialSubject.id does not match issuer property' })

// The credentialSubject.id value MUST be equal to the subject of the Domain Linkage Credential.
if (credential.subject && credential.credentialSubject.id !== credential.subject)
return Promise.reject({ status: ValidationStatusEnum.INVALID, message: 'Property credentialSubject.id does not match subject property' })

// Property credentialSubject.origin MUST be present.
if (!credential.credentialSubject.origin)
return Promise.reject({ status: ValidationStatusEnum.INVALID, message: 'Property credentialSubject.origin is not present within the credential'})
Expand Down
7 changes: 0 additions & 7 deletions test/verifier.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -272,13 +272,6 @@ describe('Domain Linkage Verifier', () => {
});
});

it('should reject if credentialSubject.id does not match present subject value', async () => {
await expect(verifier.verifyDomainLinkageCredential({ credential: { ...CREDENTIAL, subject: 'did:key:other' } })).rejects.toEqual({
status: ValidationStatusEnum.INVALID,
message: 'Property credentialSubject.id does not match subject property',
});
});

it('should reject if credentialSubject.origin is not valid domain value', async () => {
await expect(
verifier.verifyDomainLinkageCredential({
Expand Down

0 comments on commit 8f95262

Please sign in to comment.