From ed00d741ff076dedb03817545022b04ab63f8218 Mon Sep 17 00:00:00 2001 From: usbharu <64310155+usbharu@users.noreply.github.com> Date: Mon, 1 May 2023 07:19:30 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20jwk=E3=81=AE=E5=BD=A2=E5=BC=8F=E3=82=92?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/kotlin/dev/usbharu/hideout/util/JsonWebKeyUtil.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/kotlin/dev/usbharu/hideout/util/JsonWebKeyUtil.kt b/src/main/kotlin/dev/usbharu/hideout/util/JsonWebKeyUtil.kt index 73eb47a1..444e1039 100644 --- a/src/main/kotlin/dev/usbharu/hideout/util/JsonWebKeyUtil.kt +++ b/src/main/kotlin/dev/usbharu/hideout/util/JsonWebKeyUtil.kt @@ -17,7 +17,7 @@ object JsonWebKeyUtil { fun publicKeyToJwk(publicKey: RSAPublicKey): String { val e = encodeBase64UInt(publicKey.publicExponent) val n = encodeBase64UInt(publicKey.modulus) - return """{"e":"$e","n":"$n","use":"sig","kty":"RSA"}""" + return """{"keys":[{"e":"$e","n":"$n","use":"sig","kty":"RSA"}]}""" } private fun encodeBase64UInt(bigInteger: BigInteger, minLength: Int = -1): String {