Skip to content
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

Make verifiableCredential property on W3cPresentation optional #2038

Open
jrhender opened this issue Sep 17, 2024 · 0 comments
Open

Make verifiableCredential property on W3cPresentation optional #2038

jrhender opened this issue Sep 17, 2024 · 0 comments

Comments

@jrhender
Copy link

The VC data model (both v1.1 and v2.0) allow the verifiableCredential property on a VerifiablePresentation to be optional. There are cases where it may not be present, such as an authentication VP. However, the current Credo code expects that it exists as an instance or an array:

@W3cVerifiableCredentialTransformer()
@IsInstanceOrArrayOfInstances({ classType: [W3cJsonLdVerifiableCredential, W3cJwtVerifiableCredential] })
@ValidateNested({ each: true })
public verifiableCredential!: SingleOrArray<W3cVerifiableCredential>

As a first attempt, I think simply adding the @IsOptional decorator to the property may be sufficient to resolve this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant