Merge upstream

This commit is contained in:
ASTRO:? 2025-04-04 16:00:58 +09:00
commit 3e0bcd2b5b
9 changed files with 173 additions and 159 deletions

View file

@ -123,7 +123,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
}
const { publicKey, privateKey } = ps.useCertificate
? await jose.generateKeyPair(ps.signatureAlgorithm).then(async keypair => ({
? await jose.generateKeyPair(ps.signatureAlgorithm, { extractable: true }).then(async keypair => ({
publicKey: JSON.stringify(await jose.exportJWK(keypair.publicKey)),
privateKey: JSON.stringify(await jose.exportJWK(keypair.privateKey)),
}))
@ -139,6 +139,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
tenYearsLaterTime,
publicKey,
privateKey ?? '',
ps.signatureAlgorithm,
) : undefined;
const ssoServiceProvider = await this.singleSignOnServiceProviderRepository.insert({

View file

@ -60,7 +60,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
const alg = ps.signatureAlgorithm ? ps.signatureAlgorithm : service.signatureAlgorithm;
const { publicKey, privateKey } = ps.regenerateCertificate
? await jose.generateKeyPair(alg).then(async keypair => ({
? await jose.generateKeyPair(alg, { extractable: true }).then(async keypair => ({
publicKey: JSON.stringify(await jose.exportJWK(keypair.publicKey)),
privateKey: JSON.stringify(await jose.exportJWK(keypair.privateKey)),
}))
@ -76,6 +76,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
tenYearsLaterTime,
publicKey ?? '',
privateKey ?? '',
alg,
) : undefined;
await this.singleSignOnServiceProviderRepository.update(service.id, {