File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -103,6 +103,7 @@ export function getMixedCredentialRequestToCredentialMapper(): OpenId4VciCredent
103103 const parsedCertificate = X509Service . parseCertificate ( agentContext , {
104104 encodedCertificate : issuerx509certificate [ 0 ] ,
105105 } )
106+ console . log ( `\n credential validityInfo for mdoc: ${ JSON . stringify ( credential . payload . validityInfo ) } \n` )
106107 parsedCertificate . publicJwk . keyId = credential . signerOptions . keyId
107108 return {
108109 type : 'credentials' ,
@@ -111,6 +112,11 @@ export function getMixedCredentialRequestToCredentialMapper(): OpenId4VciCredent
111112 issuerCertificate : parsedCertificate ,
112113 holderKey : holderBindingDetails . jwk ,
113114 ...credential . payload ,
115+ validityInfo : {
116+ ...credential . payload . validityInfo ,
117+ validFrom : new Date ( credential . payload . validityInfo . validFrom ) ,
118+ validUntil : new Date ( credential . payload . validityInfo . validUntil ) ,
119+ } ,
114120 docType : credentialConfiguration . doctype ,
115121 } ) ) ,
116122 } satisfies OpenId4VciSignMdocCredentials
@@ -171,7 +177,7 @@ export async function getTrustedCerts() {
171177 }
172178 const data = await response . json ( )
173179 return data as string [ ]
174- } catch ( error ) {
180+ } catch ( error ) {
175181 // eslint-disable-next-line no-console
176182 console . error ( 'Error fetching data:' , error )
177183 return [ ]
You can’t perform that action at this time.
0 commit comments