Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions src/schemas/CredentialConfigurationSupportedSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,8 @@ const msoDocSchema = commonSchema.extend({
doctype: z.string()
});

const otherFormatsSchema = commonSchema.extend({
format: z.string(),
});

export const CredentialConfigurationSupportedSchema = sdJwtSchema.or(msoDocSchema).or(otherFormatsSchema);
export const CredentialConfigurationSupportedSchema = sdJwtSchema.or(msoDocSchema);

export type CredentialConfigurationSupported = z.infer<typeof CredentialConfigurationSupportedSchema>;

Expand Down
8 changes: 8 additions & 0 deletions src/schemas/OpenidCredentialIssuerMetadataSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ export const OpenidCredentialIssuerMetadataSchema = z.object({
credential_issuer: z.string(),
credential_endpoint: z.string(),
nonce_endpoint: z.string().optional(),
credential_request_encryption: z.object({
jwks: z.array(z.object({
kid: z.string(),
}).passthrough()).min(1),
enc_values_supported: z.array(z.string()).min(1),
zip_values_supported: z.array(z.string()).min(1).optional(),
encryption_required: z.boolean(),
}).optional(),
credential_response_encryption: z.object({
alg_values_supported: z.array(z.string()),
enc_values_supported: z.array(z.string()),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2712,6 +2712,6 @@ describe("OpenidCredentialIssuerMetadataSchemaValera", () => {
if (res.error) {
console.dir(res.error, { depth: null });
}
assert(res.success === true);
assert(res.success === false);
})
})