mirror of
https://github.com/usbharu/Hideout.git
synced 2026-07-21 20:53:43 +00:00
fix: Signatureヘッダーを追加
This commit is contained in:
@@ -100,7 +100,7 @@ val httpSignaturePlugin = createClientPlugin("HttpSign",::HttpSignaturePluginCon
|
||||
}
|
||||
}
|
||||
|
||||
val builder = HttpMessageSigner.builder().algorithm(algorithmType).keyId(keyId).keyMap(keyMap)
|
||||
val builder = HttpMessageSigner.builder().algorithm(algorithmType).keyId("${Config.configData.url}/users/$keyId/pubkey").keyMap(keyMap)
|
||||
var tmp = builder
|
||||
headers.forEach {
|
||||
tmp = tmp.addHeaderToSign(it)
|
||||
|
||||
@@ -50,6 +50,7 @@ class ActivityPubUserService(
|
||||
val inboxUrl = person.inbox ?: throw IllegalArgumentException("inbox is not found")
|
||||
httpClient.post(inboxUrl) {
|
||||
contentType(ContentType.Application.Activity)
|
||||
header("Signature","keyId=\"${person.preferredUsername}\",algorithm=\"rsa-sha256\",headers=\"(request-target) host date\"")
|
||||
setBody(Accept(
|
||||
name = "Follow",
|
||||
`object` = follow,
|
||||
|
||||
Reference in New Issue
Block a user