authorizationHeader
authorizationHeader(
signer,chain,input):Promise<string>
Defined in: claims.ts:403
The Authorization header for one gated request: a request for pieceCid signed by the chain’s final bearer,
presented with its chain. Make a fresh one per fetch; it expires expiresIn seconds after now (default 240).
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
signer |
ClaimSigner |
chain |
ClaimChain |
input |
{ expiresIn?: number; now?: number; pieceCid: Uint8Array; } |
input.expiresIn? |
number |
input.now? |
number |
input.pieceCid |
Uint8Array |
Returns
Section titled “Returns”Promise<string>
Throws
Section titled “Throws”As signRequest does: an expired chain, or an expiry the gate would refuse.