mirror of
https://github.com/usbharu/Hideout.git
synced 2026-09-15 14:05:00 +00:00
refactor: HttpSignatureSignerImplをリファクタリング
This commit is contained in:
@@ -55,13 +55,13 @@ class HttpSignatureSignerImpl : HttpSignatureSigner {
|
|||||||
signHeaders: List<String>
|
signHeaders: List<String>
|
||||||
): String {
|
): String {
|
||||||
headers.toMap().map { it.key.lowercase() to it.value }.toMap()
|
headers.toMap().map { it.key.lowercase() to it.value }.toMap()
|
||||||
val result = signHeaders.map {
|
val result = signHeaders.joinToString("\n") {
|
||||||
if (it.startsWith("(")) {
|
if (it.startsWith("(")) {
|
||||||
specialHeader(it, url, method)
|
specialHeader(it, url, method)
|
||||||
} else {
|
} else {
|
||||||
generalHeader(it, headers.get(it)!!)
|
generalHeader(it, headers.get(it)!!)
|
||||||
}
|
}
|
||||||
}.joinToString("\n")
|
}
|
||||||
return result
|
return result
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user