Skip to content

Commit 3af2a08

Browse files
sid6mathurthibmeu
authored andcommitted
Incorporate code review suggestions
1 parent ca79d3c commit 3af2a08

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

packages/web-bot-auth/README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,20 @@ Web Bot Authentication defined by [draft-meunier-web-bot-auth-architecture](http
2525
This section provides examples usage for signing and verifying web-bot-auth material.
2626
More concrete examples are provided on [cloudflareresearch/web-bot-auth/examples](https://github.com/cloudflareresearch/web-bot-auth#examples).
2727

28+
### Research server for debug purposes
29+
30+
To help debug `web-both-auth` HTTPS requests, Cloudflare Research provides a test endpoint on `https://http-message-signatures-example.research.cloudflare.com/debug`. You may also run this [research server's code on GitHub](https://github.com/cloudflare/web-bot-auth/tree/main/examples/verification-workers) on a local endpoint.
31+
2832
### Signing
2933

3034
```typescript
3135
import { signatureHeaders } from "web-bot-auth";
3236
import { signerFromJWK } from "web-bot-auth/crypto";
3337

3438
// The following simple request is going to be signed
35-
const request = new Request("https://http-message-signatures-example.research.cloudflare.com/debug");
39+
const request = new Request("https://example.com");
3640

37-
// This is a testing-only private key/public key pair described in RFC 9421
41+
// This is a testing-only private key/public key pair described in RFC 9421 Appendix B.1.4
3842
// Also available at https://github.com/cloudflareresearch/web-bot-auth/blob/main/examples/rfc9421-keys/ed25519.json
3943
const RFC_9421_ED25519_TEST_KEY = {
4044
kty: "OKP",
@@ -54,8 +58,8 @@ const headers = await signatureHeaders(
5458
}
5559
);
5660

57-
// Et voila! Here is our signed request
58-
const signedRequest = new Request("https://http-message-signatures-example.research.cloudflare.com/debug", {
61+
// Et voila! Here is our signed request.
62+
const signedRequest = new Request("https://example.com", {
5963
headers: {
6064
Signature: headers["Signature"],
6165
"Signature-Input": headers["Signature-Input"],

0 commit comments

Comments
 (0)