The expiration date of a credential isn't making it into a JWT-formatted VC:
In
|
take_object_property(&mut credential, "credentialSubject", "expirationDate") |
pub fn encode_jwt_vc_claims<T: Serialize>(
credential: &T,
) -> Result<RegisteredClaims, JwtVcEncodeError> {
let mut credential = json_syntax::to_value(credential)?
.into_object()
.ok_or(JwtVcEncodeError::ExpectedJsonObject)?;
let mut claims = RegisteredClaims::default();
if let Some(date_value) =
take_object_property(&mut credential, "credentialSubject", "expirationDate")
{
<...>
}
<...>
if let Some(issuance_date_entry) = credential.remove("issuanceDate").next() {
<...>
}
<...>
}
The "expirationDate" field should be taken from the credential, not the credential subject. It should work just like the "issuanceDate" case.
The expiration date of a credential isn't making it into a JWT-formatted VC:
In
ssi/crates/claims/crates/vc/src/v1/jwt/encode.rs
Line 40 in 507bdb1
The "expirationDate" field should be taken from the credential, not the credential subject. It should work just like the "issuanceDate" case.