Skip to content

Commit

Permalink
feat: Add request body signature for API requests
Browse files Browse the repository at this point in the history
  • Loading branch information
tako0614 committed Jul 30, 2024
1 parent 1895086 commit 89ce197
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions server/protocol/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,20 @@ const generateKeyPair = async () => {
},
```

### リクエストbodyの内容
```
const body = {
....
}
// request body
{
body: JSON.stringify(body),
signature: await signData(JSON.stringify(body), privateKey),
server: ${serverDomain},
}
```

### 電子署名の流れ

1. リクエスト元サーバーは秘密鍵でリクエストを署名します。
Expand Down

0 comments on commit 89ce197

Please sign in to comment.