diff --git a/src/main/kotlin/dev/usbharu/hideout/routing/LoginRouting.kt b/src/main/kotlin/dev/usbharu/hideout/routing/LoginRouting.kt deleted file mode 100644 index 0a8b9a26..00000000 --- a/src/main/kotlin/dev/usbharu/hideout/routing/LoginRouting.kt +++ /dev/null @@ -1,7 +0,0 @@ -package dev.usbharu.hideout.routing - -import dev.usbharu.hideout.service.IUserAuthService -import io.ktor.server.routing.* - -fun Routing.login(userAuthService: IUserAuthService) { -} diff --git a/src/test/kotlin/dev/usbharu/hideout/plugins/SecurityKtTest.kt b/src/test/kotlin/dev/usbharu/hideout/plugins/SecurityKtTest.kt index 32473173..9c558f36 100644 --- a/src/test/kotlin/dev/usbharu/hideout/plugins/SecurityKtTest.kt +++ b/src/test/kotlin/dev/usbharu/hideout/plugins/SecurityKtTest.kt @@ -211,7 +211,6 @@ class SecurityKtTest { Config.configData = ConfigData(url = "https://localhost", objectMapper = jacksonObjectMapper()) - val now = Instant.now() val kid = UUID.randomUUID() val token = JWT.create() @@ -231,7 +230,6 @@ class SecurityKtTest { ) } - val readValue = Config.configData.objectMapper.readerFor(Map::class.java) .readValue?>( JsonWebKeyUtil.publicKeyToJwk( @@ -273,7 +271,6 @@ class SecurityKtTest { Config.configData = ConfigData(url = "https://localhost", objectMapper = jacksonObjectMapper()) - val now = Instant.now() val kid = UUID.randomUUID() val token = JWT.create() @@ -293,7 +290,6 @@ class SecurityKtTest { ) } - val readValue = Config.configData.objectMapper.readerFor(Map::class.java) .readValue?>( JsonWebKeyUtil.publicKeyToJwk( @@ -333,7 +329,6 @@ class SecurityKtTest { Config.configData = ConfigData(url = "https://localhost", objectMapper = jacksonObjectMapper()) - val now = Instant.now() val kid = UUID.randomUUID() val token = JWT.create() @@ -353,7 +348,6 @@ class SecurityKtTest { ) } - val readValue = Config.configData.objectMapper.readerFor(Map::class.java) .readValue?>( JsonWebKeyUtil.publicKeyToJwk( @@ -393,7 +387,6 @@ class SecurityKtTest { Config.configData = ConfigData(url = "https://localhost", objectMapper = jacksonObjectMapper()) - val now = Instant.now() val kid = UUID.randomUUID() val token = JWT.create() @@ -413,7 +406,6 @@ class SecurityKtTest { ) } - val readValue = Config.configData.objectMapper.readerFor(Map::class.java) .readValue?>( JsonWebKeyUtil.publicKeyToJwk( @@ -453,7 +445,6 @@ class SecurityKtTest { Config.configData = ConfigData(url = "https://localhost", objectMapper = jacksonObjectMapper()) - val now = Instant.now() val kid = UUID.randomUUID() val token = JWT.create() @@ -472,7 +463,6 @@ class SecurityKtTest { ) } - val readValue = Config.configData.objectMapper.readerFor(Map::class.java) .readValue?>( JsonWebKeyUtil.publicKeyToJwk( diff --git a/src/test/kotlin/dev/usbharu/hideout/service/JwtServiceImplTest.kt b/src/test/kotlin/dev/usbharu/hideout/service/JwtServiceImplTest.kt index 6faa4416..7c4f90bb 100644 --- a/src/test/kotlin/dev/usbharu/hideout/service/JwtServiceImplTest.kt +++ b/src/test/kotlin/dev/usbharu/hideout/service/JwtServiceImplTest.kt @@ -42,7 +42,8 @@ class JwtServiceImplTest { val metaService = mock { onBlocking { getJwtMeta() } doReturn Jwt( kid, - Base64Util.encode(generateKeyPair.private.encoded), Base64Util.encode(generateKeyPair.public.encoded) + Base64Util.encode(generateKeyPair.private.encoded), + Base64Util.encode(generateKeyPair.public.encoded) ) } val refreshTokenRepository = mock { @@ -119,7 +120,8 @@ class JwtServiceImplTest { val metaService = mock { onBlocking { getJwtMeta() } doReturn Jwt( kid, - Base64Util.encode(generateKeyPair.private.encoded), Base64Util.encode(generateKeyPair.public.encoded) + Base64Util.encode(generateKeyPair.private.encoded), + Base64Util.encode(generateKeyPair.public.encoded) ) } val jwtService = JwtServiceImpl(metaService, refreshTokenRepository, userService)