-
Notifications
You must be signed in to change notification settings - Fork 75
Open
Description
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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels