mirror of https://github.com/usbharu/Hideout.git
Apply suggestions from code review
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
parent
96196cf7ba
commit
96402acf1c
|
@ -81,7 +81,6 @@ class InboxJobProcessor(
|
||||||
}
|
}
|
||||||
|
|
||||||
override suspend fun process(param: InboxJobParam) {
|
override suspend fun process(param: InboxJobParam) {
|
||||||
|
|
||||||
val jsonNode = objectMapper.readTree(param.json)
|
val jsonNode = objectMapper.readTree(param.json)
|
||||||
|
|
||||||
logger.info("START Process inbox. type: {}", param.type)
|
logger.info("START Process inbox. type: {}", param.type)
|
||||||
|
|
|
@ -63,7 +63,6 @@ import java.security.interfaces.RSAPrivateKey
|
||||||
import java.security.interfaces.RSAPublicKey
|
import java.security.interfaces.RSAPublicKey
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
|
||||||
|
|
||||||
@EnableWebSecurity(debug = false)
|
@EnableWebSecurity(debug = false)
|
||||||
@Configuration
|
@Configuration
|
||||||
@Suppress("FunctionMaxLength", "TooManyFunctions")
|
@Suppress("FunctionMaxLength", "TooManyFunctions")
|
||||||
|
@ -285,7 +284,6 @@ data class JwkConfig(
|
||||||
val privateKey: String
|
val privateKey: String
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@Configuration
|
@Configuration
|
||||||
class PostSecurityConfig(
|
class PostSecurityConfig(
|
||||||
val auth: AuthenticationManagerBuilder,
|
val auth: AuthenticationManagerBuilder,
|
||||||
|
|
|
@ -11,23 +11,18 @@ import dev.usbharu.httpsignature.common.HttpMethod
|
||||||
import dev.usbharu.httpsignature.common.HttpRequest
|
import dev.usbharu.httpsignature.common.HttpRequest
|
||||||
import java.net.URL
|
import java.net.URL
|
||||||
|
|
||||||
|
|
||||||
@JsonDeserialize(using = HttpRequestDeserializer::class)
|
@JsonDeserialize(using = HttpRequestDeserializer::class)
|
||||||
@JsonSubTypes
|
@JsonSubTypes
|
||||||
abstract class HttpRequestMixIn
|
abstract class HttpRequestMixIn
|
||||||
|
|
||||||
class HttpRequestDeserializer : JsonDeserializer<HttpRequest>() {
|
class HttpRequestDeserializer : JsonDeserializer<HttpRequest>() {
|
||||||
override fun deserialize(p: JsonParser, ctxt: DeserializationContext?): HttpRequest {
|
override fun deserialize(p: JsonParser, ctxt: DeserializationContext?): HttpRequest {
|
||||||
|
|
||||||
val readTree: JsonNode = p.codec.readTree(p)
|
val readTree: JsonNode = p.codec.readTree(p)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return HttpRequest(
|
return HttpRequest(
|
||||||
URL(readTree["url"].textValue()),
|
URL(readTree["url"].textValue()),
|
||||||
HttpHeaders(emptyMap()),
|
HttpHeaders(emptyMap()),
|
||||||
HttpMethod.valueOf(readTree["method"].textValue())
|
HttpMethod.valueOf(readTree["method"].textValue())
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue