Return eab kid as well

This commit is contained in:
Fang-Pen Lin
2025-11-07 09:20:05 -08:00
parent 9ed4600d1d
commit 49ad8ab630
3 changed files with 10 additions and 5 deletions
@@ -506,20 +506,21 @@ export const registerCertificateProfilesRouter = async (server: FastifyZodProvid
}),
response: {
200: z.object({
eabKid: z.string(),
eabSecret: z.string()
})
}
},
onRequest: verifyAuth([AuthMode.JWT, AuthMode.IDENTITY_ACCESS_TOKEN]),
handler: async (req) => {
const eabSecret = await server.services.certificateProfile.revealAcmeEabSecret({
const { eabKid, eabSecret } = await server.services.certificateProfile.revealAcmeEabSecret({
actor: req.permission.type,
actorId: req.permission.id,
actorAuthMethod: req.permission.authMethod,
actorOrgId: req.permission.orgId,
profileId: req.params.id
});
return { eabSecret };
return { eabKid, eabSecret };
}
});
};