From 65fde90e13c9a781a95d23194db114b3ea3c1669 Mon Sep 17 00:00:00 2001 From: sanderPostma Date: Tue, 5 Nov 2024 12:23:35 +0100 Subject: [PATCH] chore: .well-known/openid-federation return CT application/entity-statement+jwt --- packages/issuer-rest/lib/oid4vci-api-functions.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/issuer-rest/lib/oid4vci-api-functions.ts b/packages/issuer-rest/lib/oid4vci-api-functions.ts index 5e0a5fa8..382f4954 100644 --- a/packages/issuer-rest/lib/oid4vci-api-functions.ts +++ b/packages/issuer-rest/lib/oid4vci-api-functions.ts @@ -409,7 +409,10 @@ export function getMetadataEndpoints(router: Router, issu if(!issuer.openidFederationMetadata || !issuer.openidFederationMetadata.jwt) { return response.status(404).send() } - return response.send(issuer.openidFederationMetadata.jwt) + const asciiContent = Buffer.from(issuer.openidFederationMetadata.jwt, 'utf8').toString('ascii') + return response + .type('application/entity-statement+jwt') + .send(asciiContent) } router.get(WellKnownEndpoints.OPENID_FEDERATION, openidFederationHandler) }