File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -171,7 +171,7 @@ const { credential_configuration_id, credential_identifiers } =
171
171
accessToken .authorization_details [0 ]! ;
172
172
173
173
// Obtain the credential
174
- const { credential } = await Credential .Issuance .obtainCredential (
174
+ const { credential, format } = await Credential .Issuance .obtainCredential (
175
175
issuerConf ,
176
176
accessToken ,
177
177
clientId ,
@@ -186,6 +186,10 @@ const { credential } = await Credential.Issuance.obtainCredential(
186
186
}
187
187
);
188
188
189
+ // The certificate below is required to perform the `x5chain` validation of credentials in `mdoc` format.
190
+ // In a real-world scenario, it must be obtained from the appropriate endpoint exposed by the Trust Anchor
191
+ const mockX509CertRoot = format === " mso_mdoc" ? " base64encodedX509CertRoot" : undefined
192
+
189
193
/*
190
194
* Parse and verify the credential. The ignoreMissingAttributes flag must be set to false or omitted in production.
191
195
* WARNING: includeUndefinedAttributes should not be set to true in production in order to get only claims explicitly declared by the issuer.
@@ -199,7 +203,8 @@ const { parsedCredential } =
199
203
credentialCryptoContext ,
200
204
ignoreMissingAttributes: true ,
201
205
includeUndefinedAttributes: false
202
- }
206
+ },
207
+ mockX509CertRoot
203
208
);
204
209
205
210
const credentialType =
You can’t perform that action at this time.
0 commit comments