1.0.3 • Published 5 months ago

authorization-signature v1.0.3

Weekly downloads
-
License
-
Repository
-
Last release
5 months ago

authorization-signature

Create HTTP Authorization header values for HTTP Message Signatures.

Usage

byexample

These snippets should pass byexample

byexample -l javascript README.md

> const { Ed25519Signer } = await import("@did.coop/did-key-ed25519")
> const { createRequestWithHttpSignature } = await import("authorization-signature");
> const signer = await Ed25519Signer.generate()
> const url = new URL('http://example.com')
> const request = await createRequestWithHttpSignature( // byexample: +timeout=100
.   url,
.   {
.      includeHeaders: [
.        '(key-id)',
.        '(request-target)',
.        'host',
.      ],
.      signer,
.    }
.  )
> request.headers.get('authorization')?.startsWith('Signature ')
true
1.0.2

5 months ago

1.0.3

5 months ago

1.0.1

5 months ago

1.0.0

5 months ago