mirror of
https://github.com/versia-pub/docs.git
synced 2026-01-26 12:06:02 +01:00
docs: 📝 Add section on signature verification
This commit is contained in:
parent
31fb1b8920
commit
e03c8d2a6e
|
|
@ -53,6 +53,14 @@ Where:
|
||||||
|
|
||||||
Sign this string using the user's private key. The resulting signature should be encoded in Base64.
|
Sign this string using the user's private key. The resulting signature should be encoded in Base64.
|
||||||
|
|
||||||
|
### Verifying the Signature
|
||||||
|
|
||||||
|
To verify a signature, the server must:
|
||||||
|
- Recreate the string as described above.
|
||||||
|
- Extract the signature provided in the `Signature` header (`$signature` in the above section).
|
||||||
|
- Decode the signature from Base64.
|
||||||
|
- Perform a signature verification using the user's public key.
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
|
|
||||||
The following example is written in TypeScript using the WebCrypto API.
|
The following example is written in TypeScript using the WebCrypto API.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue