You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to the VC specification for JWT encoding https://www.w3.org/TR/vc-data-model/#jwt-encoding, the nbf claim must be used to represent issuanceDate property of the VC. But in the class JwtToVerifiableCredentialTransformer, it's the iat claim that is used :
Caused by: java.lang.NullPointerException: Credential must contain `issuanceDate`/`validFrom` property.
at java.base/java.util.Objects.requireNonNull(Objects.java:259)
at org.eclipse.edc.iam.verifiablecredentials.spi.model.VerifiableCredential$Builder.build(VerifiableCredential.java:204)
at org.eclipse.edc.iam.identitytrust.transform.to.JwtToVerifiableCredentialTransformer.transform(JwtToVerifiableCredentialTransformer.java:99)
Possible Implementation
In the class JwtToVerifiableCredentialTransformer, replace claims.getIssueTime() with claims.getNotBeforeTime() for setting the issuanceDate or validFrom property.
The text was updated successfully, but these errors were encountered:
huh, interesting. that almost sounds like a bug/error on the spec part, because "nbf" -> "not-before", which is entirely different than "issuanceDate", which is the date at which the token was created.
The obvious thing to do is to adapt the code as you suggested, which will satisfy the spec compliance, but I wonder if we should bring that up with the Spec group though.
Bug Report
Describe the Bug
According to the VC specification for JWT encoding https://www.w3.org/TR/vc-data-model/#jwt-encoding, the nbf claim must be used to represent issuanceDate property of the VC. But in the class JwtToVerifiableCredentialTransformer, it's the iat claim that is used :
When a VC in JWT encoding has the nbf claim but not the iat claim, an exception is thrown.
Expected Behavior
A VC in JWT encoding with the nbf claim and not the iat claim must be accepted.
Steps to Reproduce
Steps to reproduce the behavior:
Possible Implementation
In the class JwtToVerifiableCredentialTransformer, replace
claims.getIssueTime()
withclaims.getNotBeforeTime()
for setting the issuanceDate or validFrom property.The text was updated successfully, but these errors were encountered: